copy-package-json.js 398 B

12345678
  1. const path = require('path');
  2. const fs = require('fs');
  3. // Copies the main package.json file into the lib directory so that
  4. // ng-packagr can use it when generating the library bundle
  5. console.log('Copying main package.json to library...');
  6. const packageJson = require('../package');
  7. fs.writeFileSync(path.join(__dirname, '/../src/lib/package.json'), JSON.stringify(packageJson, null, 2), 'utf8');