A
A
ayapergenov2015-06-19 20:28:20
Node.js
ayapergenov, 2015-06-19 20:28:20

How to use bower or other package manager to download one file and not the whole repository?

I'm learning about automation. Confusingly, when installing packages, its entire repository is downloaded.
For example, I need jquery.min.js
I write bower install jquery.min.js It says
that such a package was not found.
And there is no need to download the entire jquery repo. How can I download a specific package manager file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2015-06-19
@k12th

What for? The whole point of package managers is that you don't know what's inside and you don't care. require('jquery') (or define(['jquery'])) will include exactly what is needed and no more. In the developer version, connecting minified versions of libraries is not self-respecting. And in production, everything should still be glued into one file and compressed.
I agree that there is a lot of garbage in packages, and few people prescribe .npmignore. It's all in our hands, pull requests.

V
Vitaliy Orlov, 2015-06-19
@orlov0562

Not yet. The main idea is that the entire provided package (bundle) is downloaded. I was also looking for a solution, at that time I found only one way - to remove everything superfluous using automation tools, after installing it through bower. But, this is still the same rake, so when you need to include only one jquery.min or something like that, I just do it with my hands, without bothering with the bower.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question