Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lirantal/lockfile-prune
Lockfiles have needs too and this package takes care of them
https://github.com/lirantal/lockfile-prune
cli lock-file lockfile nodejs shrinkwrap
Last synced: about 2 months ago
JSON representation
Lockfiles have needs too and this package takes care of them
- Host: GitHub
- URL: https://github.com/lirantal/lockfile-prune
- Owner: lirantal
- License: apache-2.0
- Created: 2020-04-24T14:50:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T20:30:31.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T11:29:17.598Z (3 months ago)
- Topics: cli, lock-file, lockfile, nodejs, shrinkwrap
- Language: JavaScript
- Size: 273 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
lockfile-prune
Lockfiles have needs too and this package takes care of them# About
This package prunes any devDependencies entries in an npm's lockfile, supporting
either `npm-shrinkwrap.json` or `package-lock.json`.# Usage
```bash
npx lockfile-prune
```# 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`:```json
"scripts": {
"prepublishOnly": "npx lockfile-prune npm-shrinkwrap.json",
"postpublish": "git checkout npm-shrinkwrap.json"
}
```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](./CONTRIBUTING.md) for guidelines on contributing to this project.
# Author
**lockfile-prune** © [Liran Tal](https://github.com/lirantal), Released under the [Apache-2.0](./LICENSE) License.