MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / deriveAppPathFromPackage

Function deriveAppPathFromPackage

packages/vite/helpers/utils.ts:113–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113function deriveAppPathFromPackage(): string | undefined {
114 const mainEntry = packageJson?.main;
115 const normalized = normalizePathSegment(mainEntry);
116 if (!normalized) return undefined;
117 const segments = normalized.split('/').filter(Boolean);
118 if (segments.length >= 2) {
119 return segments[0];
120 }
121 return undefined;
122}
123
124function computeProjectAppPath(): string {
125 if (cachedAppPath) return cachedAppPath;

Callers 1

computeProjectAppPathFunction · 0.85

Calls 2

normalizePathSegmentFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected