Bower

846 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
846
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
23
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Bower

  1. 1. Bowera package manager by Twitter
  2. 2. Bower - introduction● why another tool?● common commands● installing packages● bower.json● building custom scripts● sources
  3. 3. Developing frontend nowCommon workflow:1. Go to jquery.com2. Download jQuery3. Find fancy plugin4. Donwload it5. Link scripts to page6. Hoping for a miracle... but I broke something,WTF?
  4. 4. Common problems● changing jQuery version to newer one,but old code doesnt work with it - jQuerydo not change mayor version when bcbreaks occur.● Plugin may require specific version, butthey dont write that in docs or I didntread it.
  5. 5. Standard view
  6. 6. My viewIt is not about language,it is about programmers.
  7. 7. Bower● by Twitter● dependency manager for frontend● installing via npm● version control
  8. 8. Bower - basic commands> bower helpbower installbower updatebower searchbower uninstallbower list
  9. 9. Bower - package installing> bower install jquery> bower install modernizr#2.6.1> bower install jquery/jquery-ui> bower install ~/myCustomLib> bower install http://example.com/lib.zip
  10. 10. Bower - common sources● github● http://sindresorhus.com/bower-components/
  11. 11. bower.json{"name": "my-project","version": "1.0.0","main": "path/to/main.css","ignore": ["**/*.txt"],"dependencies": { ... }}
  12. 12. Bower - saving dependencies> bower install jquery/jquery#1.9.1 --save{"name": "js_lab","version": "0.0.0","dependencies": {"jquery": "1.9.1"}}
  13. 13. Bower - .bowerrc{"directory": "bower_components","endpoint": "https://bower.mycompany.com","json": "bower.json","searchpath": ["https://bower.herokuapp.com"],"shorthand_resolver": "git://example.com/{{{organization }}}/{{{ package }}}.git"}
  14. 14. Bower - sources● http://bower.io/● https://github.com/bower/bower

×