项目作者: lirantal

项目描述 :
Lockfiles have needs too and this package takes care of them
高级语言: JavaScript
项目地址: git://github.com/lirantal/lockfile-prune.git
创建时间: 2020-04-24T14:50:11Z
项目社区:https://github.com/lirantal/lockfile-prune

开源协议:Apache License 2.0

下载



lockfile-prune




Lockfiles have needs too and this package takes care of them


npm version
license
downloads
build
codecov
Known Vulnerabilities
Responsible Disclosure Policy

About

This package prunes any devDependencies entries in an npm’s lockfile, supporting
either npm-shrinkwrap.json or package-lock.json.

Usage

  1. npx lockfile-prune <path/to/lockfile>

Example

If you use this as part of an automated flow for releasing packages with
something like semantic-release then you only need to npx’ the lockfile
before the release process.

However, you can also automate it in the following way, by adding these
run-script hooks into package.json:

  1. "scripts": {
  2. "prepublishOnly": "npx lockfile-prune npm-shrinkwrap.json",
  3. "postpublish": "git checkout npm-shrinkwrap.json"
  4. }

The postpublish hook isn’t strictly necessary on build systems but
can prove useful to maintain the same git tree if you are publishing
from a local development machine.

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

Author

lockfile-prune © Liran Tal, Released under the Apache-2.0 License.