In development flows some
npm 5new features can be tiresome. Withnpmcleanyou could easily:
- remove
package-lock.jsononly - clean all modules, cache and
package-lock.json
$ npm install npmclean -g$ cd my-module
$ npmclean && npm i$ cd my-module
$ npmclean -l && npm i"scripts": {
...
"npmi": "npmclean -l && npm i",
"clean-install": "npmclean && npm i"
}$ 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$ rm -rf node_modules
$ rm -rf package-lock.json*
$ npm cache clean --force- Documentation improvement
- Feel free to send any PR