Question

I've only just started using Bower, so I'm likely doing it wrong. However, when I pull down jQuery through bower using this:

bower install jQuery#1.9.1

I get a folder which is about 700k in size. The only thing I need in that folder however is the jquery.js or jquery.min.js, which are 239k, and 82k respectively.

As far as I understand it, this is because bower simply pulls down everything that's in the Github repository whether it's needed or not.

Is there any way to stop this? So that bower only pulls down what is needed to develop? Or Am I misunderstanding how I should be using Bower?

Thanks.

Was it helpful?

Solution

You're using it correctly. You should have a bower.json file with all of your dependencies specified so that you don't have to include bower's plugin directory with your source code, then just run bower install from a new machine to get the dependencies.

When you install a plugin and want your bower.json automatically updated, run bower install mydependency --save.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top