@@ -19,7 +19,7 @@ then run:
19
19
20
20
$ npm install -g bower
21
21
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
23
23
it's installed correctly.
24
24
25
25
.. tip ::
@@ -43,6 +43,12 @@ create a ``.bowerrc`` file with a new destination (like ``web/assets/vendor``):
43
43
"directory" : " web/assets/vendor/"
44
44
}
45
45
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
+
46
52
An Example: Installing Bootstrap
47
53
--------------------------------
48
54
@@ -110,8 +116,31 @@ template like normal CSS/JS:
110
116
Great job! Your site is now using Bootstrap. You can now easily upgrade
111
117
bootstrap to the latest version and manage other front-end dependencies too.
112
118
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
+
113
138
.. _Bower : http://bower.io
114
139
.. _`Node.js` : https://nodejs.org
115
140
.. _BowerPHP : http://bowerphp.org/
116
141
.. _`Bower documentation` : http://bower.io/
117
142
.. _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