()
| 46 | } |
| 47 | |
| 48 | function 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 | |
| 67 | function finishPreparation() { |
| 68 | fs.copy(path.join('tools', 'assets', 'publishing'), path.join('dist', 'packages', packageName)) |
no outgoing calls
no test coverage detected
searching dependent graphs…