I just installed Node with npm to use it for frontend dependency management. I know there is also bower but why would I need another package manager that is built on top of another?
When installing a package, npm seems to always load the full source of the js library into the node_modules
directory. Just as it's downloading the complete github repository.
How do I install only the minifed (distribution) version of a javascript lib with npm?
npm
andbower
is mostly in the available repositories.npm
is normally used for fetching backend modules (as nodejs normally runs as backend), whilebower
has repositories for frontend javascript libraries. Only getting the minified version isn't directly possible withnpm
AFAIK. For bower, there is a feature request for the described behavior. Or you could try withignore
all other file extensions than.min.js
inside yourbower.json
.