Description
What
Add a flag to npm install
that does not install any dev dependencies or production dependencies.
Why
I use NPM to manage dependencies in Cordova/web apps. It allows me to organize and update things like FontAwesome, jQuery, Leaflet, and other useful JS/CSS projects that my apps use. However, npm install
pulls down every single dependency those projects have, when all I need is the finished, minified files those projects ship in their NPM packages. I end up writing rm -rf
Bash scripts consisting of manually-updated lists of the dependencies that do literally nothing for me except waste space in packaged versions of my apps, then adding those scripts as steps in the build process. Just the other day, one of those rm -rf
scripts broke because an NPM dependency was missing and I had to stop working for several hours while my home folder restored from a recent backup. Another time I had to restore a backup disk image of a Jenkins build slave VM for the exact same reason.
I can't be the only person on the planet with this use case, and it can't possibly be a very difficult feature to add.