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

Function getEntryPath

packages/webpack5/src/helpers/platform.ts:101–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 * Utility to get the entry file path for the currently targeted platform
100 */
101export function getEntryPath() {
102 const platform = getPlatform();
103
104 // use platform specific entry path
105 if (platform.getEntryPath) {
106 return platform.getEntryPath();
107 }
108
109 // try main from nativescript.config.ts
110 const main = getValue('main');
111
112 if (main) {
113 return resolve(getProjectRootPath(), main);
114 }
115
116 // fallback to main field in package.json
117 const packageJson = getPackageJson();
118
119 return resolve(getProjectRootPath(), packageJson.main);
120}
121
122/**
123 * Utility to get the entry file directory path for the currently targeted platform

Callers 5

angular.tsFile · 0.90
base.tsFile · 0.90
typescript.tsFile · 0.90
javascript.tsFile · 0.90
getEntryDirPathFunction · 0.70

Calls 6

getValueFunction · 0.90
getProjectRootPathFunction · 0.90
getPackageJsonFunction · 0.90
getPlatformFunction · 0.85
getEntryPathMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected