MCPcopy
hub / github.com/ionic-team/capacitor / resolveNode

Function resolveNode

cli/src/util/node.ts:50–60  ·  view source on GitHub ↗
(root: string, ...pathSegments: string[])

Source from the content-addressed store, hash-verified

48};
49
50export function resolveNode(root: string, ...pathSegments: string[]): string | null {
51 try {
52 return require.resolve(pathSegments.join('/'), { paths: [root] });
53 } catch (e) {
54 const path = [root, 'node_modules', ...pathSegments].join('/');
55 if (existsSync(path)) {
56 return path;
57 }
58 return null;
59 }
60}

Callers 11

getCapacitorPackageFunction · 0.90
resolvePlatformFunction · 0.90
copyCordovaJSFunction · 0.90
resolvePluginFunction · 0.90
getFilePathFunction · 0.90
loadExtConfigTSFunction · 0.90
installGradlePluginsFunction · 0.90
printInstalledPackagesFunction · 0.90
initCommandFunction · 0.90
runNativeRunFunction · 0.90

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected