Slide 1

Slide 1 text

BOWER A package manager for the web.

Slide 2

Slide 2 text

INSTALLATION 1. GET NODE 2. GET BOWER b r e w i n s t a l l n o d e n p m i n s t a l l - g b o w e r

Slide 3

Slide 3 text

USAGE GET JQUERY WHAT HAPPENED? 1. Query Twitter's Bower 2. Find jQuery 3. Clone jQuery git repo 4. Check out the latest version (git tag) 5. Check component.json & resolve any dependencies 6. Copy files to local dir b o w e r i n s t a l l j q u e r y . . . b o w e r c l o n i n g g i t : / / g i t h u b . c o m / c o m p o n e n t s / j q u e r y . g i t . . . b o w e r c a c h e d g i t : / / g i t h u b . c o m / c o m p o n e n t s / j q u e r y . g i t . . . b o w e r f e t c h i n g j q u e r y . . . b o w e r c h e c k i n g o u t j q u e r y # 1 . 9 . 1 . . . b o w e r c o p y i n g ~ / . b o w e r / c a c h e / j q u e r y / c f 6 8 c 4 c 4 e 7 5 0 7 c 8 d 2 0 f e e 7 b 5 x x x . . . b o w e r i n s t a l l i n g j q u e r y # 1 . 9 . 1 registry

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

RUBY ON RAILS ON BOWER

Slide 6

Slide 6 text

ASSETS AS GEMS? Kinda sucks. ಠ_ಠ Versioning latency External maintainers Boilerplate code So many options http://rubygems.org/search?query=bootstrap

Slide 7

Slide 7 text

BOWER INNIT Create .bowerrc file in project root Create vendor/assets/components/component.json Add asset pipeline load path in config/application.rb Run the damn thing { " d i r e c t o r y " : " v e n d o r / a s s e t s / c o m p o n e n t s " , " j s o n " : " v e n d o r / a s s e t s / c o m p o n e n t s / c o m p o n e n t . j s o n " } { " d e p e n d e n c i e s " : { " b o o t s t r a p " : " ~ 2 . 3 . 0 " } } c o n f i g . a s s e t s . p a t h s < < R a i l s . r o o t . j o i n ( ' v e n d o r / a s s e t s / c o m p o n e n t s ' ) b o w e r i n s t a l l

Slide 8

Slide 8 text

CAVEAT DEVELOPER Endpoint must be a git repo Asset versions must follow Current best practice is to .gitignore components/* What about deployment? ¯\_( â)_/¯ Options Run bower locally, scp results Run bower remotely Heroku, custom buildpack??? semver

Slide 9

Slide 9 text

COOL SHIT I DIDNT COVER ( y°□°Á y Œ━ Œ Bash autocompletion b o w e r i n s t a l l < p k g > r e g i s t e r your own bower packages use ­ ­ s a v e to add component.json dependencies

Slide 10

Slide 10 text

THANKS! eddie cianci @defeated http://litmus.com