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

Function writePackageJson

packages/vite/helpers/init.ts:33–36  ·  view source on GitHub ↗
(pkg: PackageJson)

Source from the content-addressed store, hash-verified

31}
32
33function writePackageJson(pkg: PackageJson) {
34 const pkgPath = getProjectFilePath('package.json');
35 fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n', 'utf8');
36}
37
38function ensureDependencies(pkg: PackageJson) {
39 pkg.dependencies = pkg.dependencies ?? {};

Callers 1

runInitFunction · 0.85

Calls 1

getProjectFilePathFunction · 0.70

Tested by

no test coverage detected