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

Function computeProjectAppPath

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

Source from the content-addressed store, hash-verified

122}
123
124function computeProjectAppPath(): string {
125 if (cachedAppPath) return cachedAppPath;
126 let candidate: string | undefined;
127 try {
128 const config = nsConfigToJson();
129 candidate = normalizePathSegment((config as any)?.appPath);
130 } catch {}
131 if (!candidate) {
132 candidate = deriveAppPathFromPackage();
133 }
134 cachedAppPath = candidate || 'src';
135 return cachedAppPath;
136}
137
138export function getProjectAppPath(): string {
139 return computeProjectAppPath();

Callers 2

getProjectAppPathFunction · 0.85

Calls 3

nsConfigToJsonFunction · 0.85
normalizePathSegmentFunction · 0.85
deriveAppPathFromPackageFunction · 0.85

Tested by

no test coverage detected