Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bower introduction

Bower introduction

What is Bower, why use it, and how I've been using it. Presented at ConvergeSE Richmond

David DeSandro

October 12, 2013
Tweet

More Decks by David DeSandro

Other Decks in Programming

Transcript

  1. Lots of stuff Bootstrap Foundation normalize.css fitvid.js Modernizr d3 jQuery

    Underscore / Lo-dash Backbone Angular JS Effeckt.css Masonry Font Awesome Compass H5BP jQuery UI Easing form gallery modal / popup tooltip base CSS helper JS
  2. Lots of stuff Bootstrap Foundation normalize.css fitvid.js Modernizr d3 jQuery

    Underscore / Lo-dash Backbone Angular JS Effeckt.css Masonry Font Awesome Compass H5BP jQuery UI Easing form gallery modal / popup tooltip base CSS helper JS
  3. Messy Desk Not enough space to do work Slow down

    creative process Hard to collaborate Spend time cleaning desk
  4. Lots of stuff Bootstrap Foundation normalize.css fitvid.js Modernizr d3 jQuery

    Underscore / Lo-dash Backbone Angular JS Effeckt.css Masonry Font Awesome Compass H5BP jQuery UI Easing form gallery modal / popup tooltip base CSS helper JS
  5. Installing dependencies Bower will install the package and its dependencies

    !"#  bootstrap#3.0.0      !""  jquery#2.0.3
  6. Dependencies Powerful feature Build packages on top of one another

    No longer have to depend on big frameworks
  7. bower  list  -­‐-­‐paths {      "bootstrap":  [    

         "bower_components/bootstrap/dist/js/            bootstrap.js",          "bower_components/bootstrap/dist/css/            bootstrap.css"      ],      "jquery":  "bower_components/jquery/jquery.js",      "normalize-­‐css":  "bower_components/normalize-­‐        css/normalize.css"   }
  8. Now with Bower No more committing other projects into yours

    Keep them separated Bower allows easily add them as dependencies
  9. Each dependency Its own repository Its own issue tracker Its

    own tests Finer granularity over bigger projects
  10. Encapsulation A new avenue of thinking No longer had to

    keep mental model of entire library in my head Focus on small libraries with single purpose
  11. Growing up Growing out of relying on monolithic frameworks Empowering

    developers to make and distribute their own purpose- built components
  12. packery-­‐docs#1.0.0   $""  classie#1.0.0   $"#  doc-­‐ready#1.0.2   %  !""

     eventie#1.0.3   $"#  draggabilly#1.0.6   %  $""  classie#1.0.0   %  $""  eventEmitter#4.2.4   %  $""  eventie#1.0.3   %  $"#  get-­‐size#1.1.4   %  %  !""  get-­‐style-­‐property#1.0.2   %  !""  get-­‐style-­‐property#1.0.2   $""  eventie#1.0.3   $""  get-­‐style-­‐property#1.0.2   $""  jquery#1.10.2   $""  jquery-­‐ui-­‐draggable#1.10.3   $""  normalize-­‐css#2.1.3   !"#  packery#1.1.2  
  13. How? How do you hook up Grunt tasks to Bower?

    How do you split a project into multiple files? How do you make JS work with both RequireJS and <script />? How do you create concatenated source files, for easy <link />ing?