32

I can fully appreciate the benefits of a package manager like Python's pip, Node's npm, or Ruby Gems since they're doing much more than adding files to your applications path.

Maybe I'm missing the point, or I'm being obtuse, but here are the negatives I can see:

  • Separate step when building a project
  • Separate dependency to install via another package manager (yo dawg)
  • More clutter in the projects root with bower.json and / or .bowerrc
  • Reliance on the registry being up to date, correct, and available
  • Some imports / references to things like images won't work
  • Huge overlap with npm, and often unclear which resource to use, when

The positives I can see are these:

  • I don't have to download the dependencies manually
  • Optionally install packages as part of scaffolding based on user prompts or the like

I'd really like to know of any benefits I'm unaware of, and I should say I'm not trying to be provocative I genuinely want to know.

Wil
  • 445

1 Answers1

12

From the README:

Bower is a package manager for the web. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.

Bower runs over Git, and is package-agnostic. A packaged component can be made up of any type of asset, and use any type of transport (e.g., AMD, CommonJS, etc.).

Bower has many of the benefits of other dependency managers. I'm sure there are others, but the benefits I've noticed so far include:

  • Simplify what might be called declarative dependency management; i.e. you declare your dependencies in bower.json so that other things can determine them easily
  • No need to commit dependencies to version control
  • Semantic versioning is used to help define a range of acceptable versions for a dependency, which makes it easy to update to newer versions within the defined range
  • No need to locate various builds (debug, minified, etc)
  • Simple to use different builds of a dependency for dev vs. prod
  • You can distribute the bower.json file and everyone can get up to speed with a simple "bower install"