1.0.5 • Published 7 years ago
npm-clean-cli v1.0.5
npm-clean-cli
Introduction
There are times when you're working in an npm project and you'd like to start "fresh", from a dependency point of view i.e.1
- Blow away your
node_modulesdirectory - Clean your
npmcache- Even if
it should never be necessary to clear the cache for any reason other than reclaiming disk space
- Even if
- And reinstall your
npmdependencies
Installation
npm install npm-clean-cli -gUsage
- Go to a directory that you'd like to "clean"
- Execute
npmclean- Your directory must have a
package.jsonfile or else the additional commands won't run - If you do have a
package.jsonfile, the output should look something like
- Your directory must have a
Footnotes
1 And yeah, I know that doing something like
rm -rf node_modules; npm clean cache --force; npm installis not that verbose, and even if it is, you could assign it to a bash alias. But hey, I guess I like to overengineer things.