documentcloud/backbone — pull request #2622 by paulmillr (2013-06-19 07:20:30+00:00)
Title: Reconsider package manager support (bower, component(1))

There is one node package manager: NPM. There are lots of client-side package managers.

Until now, all of them weren’t that popular. Now we have two really popular managers:

1. [Twitter Bower](http://bower.io) which is supported by google and is used in many projects (2.5K+).
2. [Component(1)](https://github.com/component/component/wiki/Components#wiki-date-utilities) which has over 1'000 components. Component(1) philosophy is in super-simple reusable components and this is really cool.

These package managers have very distinct philosophy and are not really compatible with each other, so it makes sense to support both. Many libraries are already doing so (bootstrap, normalise.css, moment.js -- totally ~70K stars for all).

**Now, there is a problem.** We want automatic compilation of bower or component(1) packages. `bower install backbone` will simply clone git repository. Build tool won’t know what is the exact file used. This can be done by manual specification, e.g. `"main"` field of `bower.json` and `component.json`.

*What does it take to support two JSON files?* Just bump versions on each release and that’s all (can be automated). See [my example repo](https://github.com/paulmillr/es6-shim) with these files. There are a lot of folks who would gladly send pull requests and improvements for bower and component support (i’m the one). You don’t even need to mess with it.

Just add `bower.json` and `component.json`. This will really simplify our day-to-day life.