Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add ability to install only the packages in package.json without any of their dependencies #1216

Closed
skylarmt opened this issue Apr 28, 2020 · 1 comment
Labels
Enhancement new feature or improvement

Comments

@skylarmt
Copy link

skylarmt commented Apr 28, 2020

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.

References

@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is reproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants