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

/copy-pkg/

    Package Sidebar

    Install

    npm i copy-pkg

    Weekly Downloads

    46

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • thejameskyle