What is the advantage of using Bower to install all the package contents that I don’t even need?

Imagine I would like to use plugins like angular.js and html5shiv on my site. Now I could use bower to install these packages along with all the unnecessary files inside these packages, or I could just include the files hosted by cdn from Google or Cloudflare. So can someone please tell me what would be the advantage of adding all the necessary plugins to bower.json and then manually loading the .js file from the packages that I would need to include in my HTML file. Isn't that a lot more complicated and resource intensive?

Example: why should I add angular.js to bower.json and download the entire Angular package, including the Gruntfile, all dependencies and assets (9MB!), Etc. instead of adding one single line to my HTML file.

When does it make sense to use Bower? The only advantage I see is that other developers can see the dependencies of your project ...

+7
html angularjs bower html5shiv
source share
1 answer

The truth is that for using only one library, the monkey is crowded. The case when the brilliance of the radiance is when you are several libraries, and some of them depend on each other. Like you:

  • angular
  • JQuery
  • Choice2
  • angular -ui
  • angular-route segment

angular -ui / ui-utils describe their dependency as:

"angular": ">= 1.0.2" 

it will accept any version of angular larger than 1.0.2. I am your project or any of your dependencies point the angular version to less than 1.0.2, the gazebo will tell and ask how to resolve the conflict.

+1
source share

All Articles