npmbowerproductionpackage-managersend-user

npm and bower installing only end-user/production files


Lately I have been wondering if there is any way to use bower or npm only as a consumer. Let’s say I am not really interested on developing the package further, but simply using it on my website/application.

So as I would first think:

npm install jquery

I have tried with the flag --production but the same structure was downloaded.

However, that brings me a huge tree of files and the only one I would need is the jquery/dist/jquery.min.js file.

Same goes for bower:

bower install jquery

Again, an expensive list of files, including src folder with a lot of dev-only related files.

I am sorry if I am wrongly assuming package managers behaviour here, but it would be interesting to know how to use these package managers as a simple end-user instead a developer in order to keep my project dependencies updated.

At the moment, I feel that it's just too much for what I need, and that by simply copying jquery.min.js over to my project src folder, it would be much cleaner/simpler.

If the concept of both npm and bower is different and someone can point it out it would be appreciated as well as any tips for an alternative package manager that only imports essential production files.


Solution

  • Apparently Volo does exactly what I was looking for following a concept where JS libraries should be kept as one single JS file.

    Here, more information about the project’s design goals.