Luis Hernandez
Luis Hernandez

Reputation: 63

How can I install npm packages without the source code

Is it possible to install an npm package without all the other artifacts. For instance install only the content of the dist folder for the jQuery npm package?

Upvotes: 3

Views: 731

Answers (1)

topheman
topheman

Reputation: 7902

It remains to the module publisher to exclude such files as sources, docs, tests ... and only include build and binary files when they publish their npm package (via prepublish hooks, .npmignore files, etc ...).

Not all maintainers are aware / take that in account ... The only thing you can do, as a module consumer (when you npm install) is to use the --production flag, not to install devDependencies (but that's not what you're looking for)

Upvotes: 3

Related Questions