Jonathan Pettersson

Full stack developer & Team lead

@Spotify, Stockholm

Manage web dependencies with Bower


A while ago I wrote about using a microgem to manage web assets. Since then I’m happy to have discovered a much better way: Bower.

Bower is similar to both gem and npm, but it makes no assumptions about the package contents, they can contain JS, CSS, fonts, etc. It has a flat dependency hierarchy and runs on git.

Each package contains a JSON file that describes the contents and specifies the semantic version. The project where you want to include your packages contains a bower.json file with a list of packages and versions. A simple “bower install” command downloads everything.

It effectively solves the problem of “front-end package management” and nothing more. With Bower I don’t have wrestle gem or npm into distributing files that have nothing to do with Ruby or Node.