Benefits of Using Bower over Git Submodules

What are the benefits of using Bower vs Git Submodules?

Since Bower simply clones the repo locally and provides you with a link to the executable, I personally find that using submodules is easier and does the job just as well.

Is there something I am missing here, is there a good reason to put Bower on your stack and repositories?

+7
javascript bower
source share
2 answers

Because it saves time. Let's say if you are a jquery # XX version and want to install jQuery # YX version, all you have to do is:

bower install jquery#YX

and then you can remove the obsolete version of jquery with:

bower uninstall jquery#XX

and also allows you to clearly define the dependencies in the bower.json file.

It also makes it easier to find documentation and the exact version of the dependency your project requires. Usually in the traditional way, you will either forget the version or the source from which you downloaded the file.

+3
source share

Here are a few reasons I can think of:

  • Versions . Bower lets you determine which version of a package you want to depend on, including the latest version, version ranges, and more.
  • Registry - Bower has a registry that saves you the trouble of finding the right Git repositories for each of your dependencies
  • Transitional dependencies - Bower will install all the transitive dependencies for you
  • Ignore . Bower packages can determine which resources to ignore when installing a package.

Most of these benefits are not specific to Bower, but rather the benefits of using a package manager instead of manually doing it yourself.

+4
source share

All Articles