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

Function readPackageJson

packages/vite/helpers/init.ts:27–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25} as const;
26
27function readPackageJson(): PackageJson {
28 const pkgPath = getProjectFilePath('package.json');
29 const raw = fs.readFileSync(pkgPath, 'utf8');
30 return JSON.parse(raw) as PackageJson;
31}
32
33function writePackageJson(pkg: PackageJson) {
34 const pkgPath = getProjectFilePath('package.json');

Callers 1

runInitFunction · 0.85

Calls 2

getProjectFilePathFunction · 0.70
parseMethod · 0.65

Tested by

no test coverage detected