Rails Assets wroc_love.rb

Rails Assets wroc_love.rb

wroc_love.rb 2014 lighting talk - the state and future of rails-assets.org

9fae8c5d475fe322a3a74e53d56ee2a0?s=128

Tymon Tobolski

March 16, 2014
Tweet

Transcript

  1. Asset Management
 in Rails

  2. State of the art • /vendor/assets • asset gems Ruby

    World JavaScript World • /vendor/assets • bower
  3. So what's the problem? • Asset Gems won't package themselves

    • Asset Gems are always step behind official libraries • Unnecessary stuff like ruby helpers :-(
  4. If only I could use 
 bower components in ruby

  5. + rails-assets.org

  6. source 'https://rubygems.org' +source 'https://rails-assets.org' ! gem 'rails' ! group :assets

    do gem 'sass-rails' gem 'uglifier' gem 'coffee-rails' + gem 'rails-assets-bootstrap' + gem 'rails-assets-angular' + gem 'rails-assets-leaflet' end
  7. application.js ! ! ! //= require_self +//= require bootstrap +//=

    require angular +//= require leaflet //= require_tree . application.css ! ! /* *= require_self +*= require bootstrap +*= require leaflet *= require_tree . */
  8. None
  9. Is it any good? • No more vendor/assets :-) •

    Proper versioning :-D • Dependency resolution x-D • Just works!
  10. What's the catch? • Rails Assets is centralized solution •

    Only tag releases are bundled to .gem files • Mixing assets definitions with gem definitions • Long gem names (rails-assets-jquery)
  11. bower-rails source 'https://bower.io' ! asset "angular" asset "underscore", "~> 2.0"

    ! group :test, :development do asset "karma" end
  12. application.js ! ! ! //= require_self +//= require bootstrap +//=

    require angular +//= require leaflet //= require_tree . application.css ! ! /* *= require_self +*= require bootstrap +*= require leaflet *= require_tree . */
  13. We're joining forces! rails-assets + bower-rails = <3

  14. Please help us! Tymon Tobolski ! i@teamon.eu @iteamon Adam Stankiewicz

    ! sheerun@sher.pl
 @sheerun GitHub: rails-assets/rails-assets