MCPcopy Index your code
hub / github.com/NativeScript/firebase / cleanPackage

Function cleanPackage

tools/scripts/build-finish.ts:48–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48function cleanPackage() {
49 // helps remove unwanted properties which may be added by other tooling
50 const packageJsonPath = path.resolve(rootDir, 'dist', 'packages', packageName, 'package.json');
51 let packageJson = fs.readFileSync(packageJsonPath, { encoding: 'utf-8' });
52 if (packageJson) {
53 packageJson = parseJson(packageJson);
54 // we don't need module or type properties at the moment
55 delete packageJson['module'];
56 delete packageJson['type'];
57 fs.writeFileSync(packageJsonPath, serializeJson(packageJson));
58
59 const angularNpmIgnorePath = path.resolve(rootDir, 'dist', 'packages', packageName, 'angular', '.npmignore');
60 // remove .npmignore as we don't need it in angular folder if found
61 if (fs.existsSync(angularNpmIgnorePath)) {
62 fs.unlinkSync(angularNpmIgnorePath);
63 }
64 }
65}
66
67function finishPreparation() {
68 fs.copy(path.join('tools', 'assets', 'publishing'), path.join('dist', 'packages', packageName))

Callers 1

finishPreparationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…