New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

copy-pkg

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-pkg

Copy a package.json

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
100
13.64%
Maintainers
1
Weekly downloads
 
Created
Source

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)
  • read-pkg
  • write-pkg

Keywords

copy

FAQs

Package last updated on 02 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts