-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweaks to bower entry - specifically committing deps #5294
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ then run: | |
|
||
$ npm install -g bower | ||
|
||
After this command succeeded, run ``bower`` in your terminal to find out if | ||
After this command finishes, run ``bower`` in your terminal to find out if | ||
it's installed correctly. | ||
|
||
.. tip:: | ||
|
@@ -43,6 +43,12 @@ create a ``.bowerrc`` file with a new destination (like ``web/assets/vendor``): | |
"directory": "web/assets/vendor/" | ||
} | ||
|
||
.. tip:: | ||
|
||
If you're using a frontend build system like `Gulp`_ or `Grunt`_, then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. front-end There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. committing assets totally defeats the purpose but is better than not saying anything. so 👍 @weaverryan, but would be nice a more clear message that you can also use npm alone and, despite of SO, successfully! |
||
you can set the directory to whatever you want. Typically, you'll use | ||
these tools to ultimately move all assets into the ``web/`` directory. | ||
|
||
An Example: Installing Bootstrap | ||
-------------------------------- | ||
|
||
|
@@ -110,8 +116,31 @@ template like normal CSS/JS: | |
Great job! Your site is now using Bootstrap. You can now easily upgrade | ||
bootstrap to the latest version and manage other front-end dependencies too. | ||
|
||
Should I Git Ignore or Commit Bower Assets? | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Currently, you should probably *commit* the assets downloaded by Bower instead | ||
of adding the directory (e.g. ``web/assets/vendor``) to your ``.gitignore`` | ||
file: | ||
|
||
.. code-block:: bash | ||
|
||
git add web/assets/vendor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing |
||
|
||
Why? Unlike Composer, Bower currently does not have a "lock" feature, which | ||
means that there's no guarantee that running ``bower install`` on a different | ||
server will give you the *exact* assets that you have on other machines. | ||
For more details, read the article `Checking in fronte-end dependencies`_. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. front-end |
||
|
||
But, it's very possible that Bower will add a lock feature in the future | ||
(e.g. `bower/bower#1748`_) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing full stop: |
||
|
||
.. _Bower: http://bower.io | ||
.. _`Node.js`: https://nodejs.org | ||
.. _BowerPHP: http://bowerphp.org/ | ||
.. _`Bower documentation`: http://bower.io/ | ||
.. _Bootstrap: http://getbootstrap.com/ | ||
.. _Gulp: http://gulpjs.com/ | ||
.. _Grunt: http://gruntjs.com/ | ||
.. _`Checking in fronte-end dependencies`: http://addyosmani.com/blog/checking-in-front-end-dependencies/ | ||
.. _`bower/bower#1748`: https://github.com/bower/bower/pull/1748 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"has finished"?