Assets on Rails na Prática

  • 386 views
Uploaded on

Entendendo, configurando e aplicando a estrutura de assets do Rails.

Entendendo, configurando e aplicando a estrutura de assets do Rails.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
386
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ASSETS ON RAILS NA PRÁTICAENTENDENDO, CONFIGURANDO E APLICANDO RAMON BISPO http://ramonpage.com @ramonpage
  • 2. ASSET PACKAGING NO RAILS @RAMONPAGE
  • 3. UM POUCO DE HISTÓRIA Rails < 3.1- Jammit http://documentcloud.github.com/jammit/- Asset Packager https://github.com/sbecker/asset_packager Rails 3.1+- Sprockets https://github.com/sstephenson/sprockets @RAMONPAGE
  • 4. RAILS 3.1+ ASSET PIPELINEconfig.assets.enabled = true @RAMONPAGE
  • 5. RAILS 3.1+ ASSET PIPELINE FINGERPRINTING /stylesheets/styles.css?2509895876styles.css => styles-908e25f4bf641868d8683022a5b62f54.css @RAMONPAGE
  • 6. ESTRUTURA DOSASSETS NO RAILS↳ app ↳ assets ↳ images - ... ↳ javascripts - application.js - ... ↳ stylesheets - application.css - ... ↳ ... @RAMONPAGE
  • 7. ENTENDENDO OS MANIFESTOSapplication.js//= require jquery//= require jquery_ujs//= require_tree .application.css/* *= require_self *= require_tree .*/ @RAMONPAGE
  • 8. MAIS SOBREASSET PIPELINE RAILS GUIDEShttp://guides.rubyonrails.org/asset_pipeline.html @RAMONPAGE
  • 9. ENTENDENDOPRÉ-PROCESSADORESCOFFEESCRIPT http://jashkenas.github.com/coffee-script/ SASS http://sass-lang.com/ COMPASS http://compass-style.org/ @RAMONPAGE
  • 10. SASS EM USO .CSS .SASS.content-navigation { $blue: #3bbfce border-color: #3bbfce; $margin: 16px color: #2b9eab;} .content-navigation border-color: $blue.border { color: darken($blue, 9%) padding: 8px; margin: 8px; .border border-color: #3bbfce; padding: $margin / 2} margin: $margin / 2 border-color: $blue @RAMONPAGE
  • 11. NÃO GOSTOU?DÊ UMA OLHADA NO LESS http://lesscss.org/ @RAMONPAGE
  • 12. SHOW METHE CODE @RAMONPAGE
  • 13. OBRIGADO! RAMON BISPO http://ramonpage.com @ramonpage