Skip to content
This repository has been archived by the owner on Dec 5, 2018. It is now read-only.
/ npmclean Public archive

Clean local npm module before reinstall

License

Notifications You must be signed in to change notification settings

bySabi/npmclean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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