Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

Latest commit

 

History

History
72 lines (54 loc) · 1.58 KB

File metadata and controls

72 lines (54 loc) · 1.58 KB

npmclean

npm version npm downloads Windows Tests bitHound Overall Score

In development flows some npm 5 new features can be tiresome. With npmclean you could easily:

  • remove package-lock.json only
  • clean all modules, cache and package-lock.json

Installation

npm

$ npm install npmclean -g

Shell usage

Full clean & install all modules

$ cd my-module
$ npmclean && npm i

Install new modules only

$ cd my-module
$ npmclean -l && npm i

package.json useful run-scripts

"scripts": {
  ...
  "npmi": "npmclean -l && npm i",
  "clean-install": "npmclean && npm i"
}

CLI options

$ npmclean -h

  Usage: npmclean [options]

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    -l, --rm-lock  Remove only package-lock.json
    -s, --silent   Silent output console

How full clean environment is performed

$ rm -rf node_modules
$ rm -rf package-lock.json*
$ npm cache clean --force

Contributing

  • Documentation improvement
  • Feel free to send any PR

License

ISC