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

Yet another JS/CSS workflow

Botify
March 07, 2014

Yet another JS/CSS workflow

A friday presentation to show the different tools we use to compile our CSS and JS files and how we work every day at @botify

- Source Code: https://github.com/pleasedontbelong/botify_prez
- Boilerplate: https://github.com/pleasedontbelong/django-boilerplate

Botify

March 07, 2014
Tweet

More Decks by Botify

Other Decks in Technology

Transcript

  1. Let’s get dirty ❖ How to manage environments ❖ Manage

    third party JS libs and packages ❖ Automatically compile files on dev ❖ “Deploy” (Compress)
  2. What do you need to know? ❖ What is JS?

    ❖ What is CSS? ❖ What is Compass? ❖ What is Git? ❖ What is Django? (not really)
  3. From scratch Introducing yet another Django Boilerplate github.com/pleasedontbelong/django-boilerplate/ Lock and

    loaded in 15 mins (too much): ❖ Django ❖ Pipeline ❖ South ❖ etc. Need some work
  4. How to manage gems in environments Introducing Bundler http://bundler.io/ -

    Consistent environment for ruby applications - Track the rubygems your application needs - Install gems from a Gemfile with: $ bundle install - Run gems with $ bundle exec <gem> <params>
  5. How to manage gems in environments - Manage dependencies -

    Automatization - Manage gem versions
  6. Manage third party libs and packages Introducing Bower http://bower.io/ -

    A package manager for the web - Works with Git - From command line $ bower install <name>=<package>#<version> - Almost all packages (you can add your own) http://bower.io/search/
  7. Manage third party libs and packages - Manage dependencies -

    Automatization - Keeps your repository clean! (especially for the brave ones that are still using SVN)
  8. Automatically compile files on dev Introducing Guard https://github.com/guard/guard - Handle

    events on file system modifications - Plugins for compass, sass, etc - Run shell scripts - Live Reload
  9. Automatically compile files on dev (save) CTRL+S (goto console) ALT+TAB

    (compile) Up => ENTER (goto browser) ALT+TAB 2x (refresh) CTRL+F5 (goto IDE) ALT+TAB 2x CODE CODE (save) CTRL+S (goto console) ALT+TAB (compile) Up => ENTER …..
  10. “Deploy” (Compress) Introducing require.js http://requirejs.org/ - Optimization tool - Combine

    scripts together - … I’d need another presentation and another presentator.
  11. Why we didn’t use them? - Glue (python) for generating

    sprites - Pipeline (django) for integrating and compressing JS/CSS, versioning and deploying to S3 - A dev/staging/prod environments