GithubHelp home page GithubHelp logo

lirantal / lockfile-prune Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 280 KB

Lockfiles have needs too and this package takes care of them

License: Apache License 2.0

JavaScript 100.00%
lockfile shrinkwrap nodejs lock-file cli

lockfile-prune's Introduction

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

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:

 "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 for guidelines on contributing to this project.

Author

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

lockfile-prune's People

Contributors

lirantal avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lockfile-prune's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.