copy-pkg

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i copy-pkg

Weekly Downloads

52

Version

1.0.0

License

MIT

Last publish

Collaborators

  • thejameskyle