()
| 99 | * Utility to get the entry file path for the currently targeted platform |
| 100 | */ |
| 101 | export 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 |
no test coverage detected