copy-pkg

Copy a package.json

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
copy-pkg
861.0.07 years ago7 years agoMinified + gzip package size for copy-pkg in KB

Readme

copy-pkg
Copy a package.json

Install

yarn add copy-pkg

Usage

copy-pkg package.json dist/package.json --only name,version

const copyPkg = require('copy-pkg');

copyPkg('package.json', 'dist/package.json', {
  ignore: ['devDependencies'],
});

copyPkg.sync('package.json', 'dist/package.json', {
  normalize: true,
});

Options
  • opts.normalize (--normalize, -n) - Normalize the package.json contents (boolean)
  • opts.ignore (--ignore, -i) - Select keys to copy (array)
  • opts.only (--only, -o) - Select keys not to copy (array)

Related