@@ -19,7 +19,7 @@ then run:
1919
2020 $ npm install -g bower
2121
22- After this command succeeded , run ``bower `` in your terminal to find out if
22+ After this command finishes , run ``bower `` in your terminal to find out if
2323it's installed correctly.
2424
2525.. tip ::
@@ -43,6 +43,12 @@ create a ``.bowerrc`` file with a new destination (like ``web/assets/vendor``):
4343 "directory" : " web/assets/vendor/"
4444 }
4545
46+ .. tip ::
47+
48+ If you're using a frontend build system like `Gulp `_ or `Grunt `_, then
49+ you can set the directory to whatever you want. Typically, you'll use
50+ these tools to ultimately move all assets into the ``web/ `` directory.
51+
4652An Example: Installing Bootstrap
4753--------------------------------
4854
@@ -110,8 +116,31 @@ template like normal CSS/JS:
110116Great job! Your site is now using Bootstrap. You can now easily upgrade
111117bootstrap to the latest version and manage other front-end dependencies too.
112118
119+ Should I Git Ignore or Commit Bower Assets?
120+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121+
122+ Currently, you should probably *commit * the assets downloaded by Bower instead
123+ of adding the directory (e.g. ``web/assets/vendor ``) to your ``.gitignore ``
124+ file:
125+
126+ .. code-block :: bash
127+
128+ git add web/assets/vendor
129+
130+ Why? Unlike Composer, Bower currently does not have a "lock" feature, which
131+ means that there's no guarantee that running ``bower install `` on a different
132+ server will give you the *exact * assets that you have on other machines.
133+ For more details, read the article `Checking in fronte-end dependencies `_.
134+
135+ But, it's very possible that Bower will add a lock feature in the future
136+ (e.g. `bower/bower#1748 `_)
137+
113138.. _Bower : http://bower.io
114139.. _`Node.js` : https://nodejs.org
115140.. _BowerPHP : http://bowerphp.org/
116141.. _`Bower documentation` : http://bower.io/
117142.. _Bootstrap : http://getbootstrap.com/
143+ .. _Gulp : http://gulpjs.com/
144+ .. _Grunt : http://gruntjs.com/
145+ .. _`Checking in fronte-end dependencies` : http://addyosmani.com/blog/checking-in-front-end-dependencies/
146+ .. _`bower/bower#1748` : https://github.com/bower/bower/pull/1748
0 commit comments