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

Introduction to Bower

Introduction to Bower

A very quick and cheerful introduction to Bower for the local JS meetup group

Gilles Ruppert

November 15, 2013
Tweet

More Decks by Gilles Ruppert

Other Decks in Programming

Transcript

  1. What is Bower? • package manager for the web •

    targets front-end • unopionated • cli and programmatic interfaces • no shared dependencies • flat dependency tree
  2. Old days (install libraries) • go to http://www.jquery.com • download

    latest version • copy lib folder • do the same for other libs
  3. Old days (update lib) • go to http://jquery.com • check

    whether there is a newer version • download • move to correct folder and overwrite previous lib • if broken, find old version and use that
  4. The bower way (install) • bower search query (if you

    don’t know what the package is called) • bower install jquery
  5. The bower way (update) • bower update • if it

    breaks, bower install package#version
  6. starting a project • bower init • same as npm

    init • creates a bower.json file
  7. finding & installing • bower search jquery • bower install

    jquery • bower install --save jquery • bower install --save-dev expect
  8. useful commands • bower uninstall package_name • bower list •

    bower search package_name • bower home package_name • bower prune • bower update
  9. assume this • write project • write separate package (i.e.

    mini lib?) • use 2nd package as part of 1st • 2nd package changes
  10. –you “F***! Do I really have to push a new

    version each time I do a change?!?!? I will go back to my monolith!”
  11. .bowerrc • directory • cwd • custom registry • etc

    • (https://docs.google.com/document/d/ 1APq7oA9tNao1UYWyOm8dKqlRP2blVkROYLZ2fL IjtWc/edit#heading=h.4pzytc1f9j8k)