1 [Bower][] is a package manager for the user-facing website content
2 (JavaScript, CSS, media, …). It's less JavaScript focused than
3 [[Jam]], so it can't compile optimized JavaScript. That's not a big
4 loss though, because you can always use the [RequireJS
5 optimizer][optimizer] directly.
7 Following the [docs][] (with my already-configured [[`~/.local`
10 $ npm install -g bower
12 Install some stuff in your project:
14 $ bower install bootstrap d3 requirejs
16 This automatically installs dependencies like [jQuery][], as you'd
17 expect from a package manager:
20 bower check-new Checking for new versions of the project dependencies..
22 ├─┬ bootstrap#3.0.0 extraneous
24 ├── d3#3.3.4 extraneous
25 └── requirejs#2.1.8 extraneous
27 The package tree is flat:
29 $ ls bower_components/
30 bootstrap d3 jquery requirejs
32 Unlike [[Jam]], you get a whole host stuff along with the JavaScript.
34 $ tree bower_components/boostrap
35 bower_components/bootstrap/
55 │ └── bootstrap.min.js
63 ├── getting-started.html
72 That's a lot of stuff! Define your dependencies for reuse with a
85 Now that you've listed the dependencies, Bower no longer thinks they
89 bower check-new Checking for new versions of the project dependencies..
97 [Bower]: http://bower.io/
98 [docs]: http://bower.io/#installing-bower
99 [optimizer]: http://requirejs.org/docs/optimization.html
100 [jQuery]: http://jquery.com/
101 [bower.json]: http://bower.io/#defining-a-package
103 [[!tag tags/programming]]