SlideShare a Scribd company logo
ASSETS ON RAILS NA
        PRÁTICA
ENTENDENDO, CONFIGURANDO E APLICANDO


               RAMON BISPO
            http://ramonpage.com
                 @ramonpage
ASSET PACKAGING
    NO RAILS



     @RAMONPAGE
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
RAILS 3.1+

     ASSET PIPELINE

config.assets.enabled = true




        @RAMONPAGE
RAILS 3.1+
         ASSET PIPELINE FINGERPRINTING

           /stylesheets/styles.css?2509895876

styles.css => styles-908e25f4bf641868d8683022a5b62f54.css




                      @RAMONPAGE
ESTRUTURA DOS
ASSETS NO RAILS
↳ app
 ↳ assets
   ↳ images
     - ...
   ↳ javascripts
     - application.js
     - ...
   ↳ stylesheets
     - application.css
     - ...
   ↳ ...
             @RAMONPAGE
ENTENDENDO OS
  MANIFESTOS
application.js
//= require jquery
//= require jquery_ujs
//= require_tree .


application.css
/*
     *= require_self
     *= require_tree .
*/
                  @RAMONPAGE
MAIS SOBRE
ASSET PIPELINE
           RAILS GUIDES
http://guides.rubyonrails.org/asset_pipeline.html




               @RAMONPAGE
ENTENDENDO
PRÉ-PROCESSADORES
COFFEESCRIPT http://jashkenas.github.com/coffee-script/
        SASS http://sass-lang.com/
     COMPASS http://compass-style.org/




                    @RAMONPAGE
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
NÃO GOSTOU?
DÊ UMA OLHADA NO LESS



      http://lesscss.org/




      @RAMONPAGE
SHOW ME
THE CODE



  @RAMONPAGE
OBRIGADO!


    RAMON BISPO
 http://ramonpage.com
      @ramonpage

More Related Content

Viewers also liked

Nexum Federal Brochure
Nexum Federal BrochureNexum Federal Brochure
Nexum Federal BrochureMike Fatigati
 
карта мышления для вики
карта мышления для викикарта мышления для вики
карта мышления для викиKonshina
 
Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29
Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29
Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29John "Charlie" Keracik
 
Maxilo Facial
Maxilo Facial Maxilo Facial
Maxilo Facial
Dan Melendez
 
Seminario Mexico Italia
Seminario Mexico ItaliaSeminario Mexico Italia
Seminario Mexico Italia
cusimano
 
Presentation biology nervous tissue
Presentation biology nervous tissuePresentation biology nervous tissue
Presentation biology nervous tissueNureskylukman
 
08. juknis analisis kondisi satuan pendidikan (isi revisi)
08. juknis analisis kondisi satuan pendidikan (isi revisi)08. juknis analisis kondisi satuan pendidikan (isi revisi)
08. juknis analisis kondisi satuan pendidikan (isi revisi)Suaidin -Dompu
 
MASW academic writing orientation 2016
MASW academic writing orientation 2016MASW academic writing orientation 2016
MASW academic writing orientation 2016
Martin McMorrow
 
Contoh bahasa indonesia
Contoh bahasa indonesiaContoh bahasa indonesia
Contoh bahasa indonesiaSuaidin -Dompu
 

Viewers also liked (15)

1. contoh telaah skl
1. contoh telaah skl1. contoh telaah skl
1. contoh telaah skl
 
26. ppkn sd mi
26. ppkn sd mi26. ppkn sd mi
26. ppkn sd mi
 
Nexum Federal Brochure
Nexum Federal BrochureNexum Federal Brochure
Nexum Federal Brochure
 
карта мышления для вики
карта мышления для викикарта мышления для вики
карта мышления для вики
 
Kesihatan fizikal 1
Kesihatan fizikal 1Kesihatan fizikal 1
Kesihatan fizikal 1
 
Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29
Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29
Experimental Study of the Pyrolysis of Eagle Ford Oil Shale act3_JH %281%29
 
Maxilo Facial
Maxilo Facial Maxilo Facial
Maxilo Facial
 
Seminario Mexico Italia
Seminario Mexico ItaliaSeminario Mexico Italia
Seminario Mexico Italia
 
Presentation biology nervous tissue
Presentation biology nervous tissuePresentation biology nervous tissue
Presentation biology nervous tissue
 
08. juknis analisis kondisi satuan pendidikan (isi revisi)
08. juknis analisis kondisi satuan pendidikan (isi revisi)08. juknis analisis kondisi satuan pendidikan (isi revisi)
08. juknis analisis kondisi satuan pendidikan (isi revisi)
 
166 sspcc1 b_newman
166 sspcc1 b_newman166 sspcc1 b_newman
166 sspcc1 b_newman
 
Digipack
DigipackDigipack
Digipack
 
112205769 tema-2
112205769 tema-2112205769 tema-2
112205769 tema-2
 
MASW academic writing orientation 2016
MASW academic writing orientation 2016MASW academic writing orientation 2016
MASW academic writing orientation 2016
 
Contoh bahasa indonesia
Contoh bahasa indonesiaContoh bahasa indonesia
Contoh bahasa indonesia
 

Similar to Assets on Rails na Prática

Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compassChris Lee
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nl
Hans Kuijpers
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Claudina Sarahe
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Fabio Akita
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
jsmith92
 
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com RubyFisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fabio Akita
 
Pacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASSPacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASS
Steve Krueger
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
Marco Pinheiro
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
Mario Noble
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
Visual Engineering
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESSItai Koren
 
Modularization css with sass
Modularization css with sassModularization css with sass
Modularization css with sass
Huiyi Yan
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
James Pearce
 
Elegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs SassElegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs SassMediacurrent
 
Finding your way with Sass+Compass
Finding your way with Sass+CompassFinding your way with Sass+Compass
Finding your way with Sass+Compass
drywallbmb
 
Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)
emrox
 
LESS
LESSLESS
LESS
Joe Seifi
 
Css frameworks
Css frameworksCss frameworks
Css frameworks
Dimitar Belchugov
 
CSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassCSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & Compass
Lucien Lee
 

Similar to Assets on Rails na Prática (20)

Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compass
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nl
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
 
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com RubyFisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
 
Pacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASSPacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASS
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
 
Modularization css with sass
Modularization css with sassModularization css with sass
Modularization css with sass
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
 
Big Frontends Made Simple
Big Frontends Made SimpleBig Frontends Made Simple
Big Frontends Made Simple
 
Elegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs SassElegant CSS Design In Drupal: LESS vs Sass
Elegant CSS Design In Drupal: LESS vs Sass
 
Finding your way with Sass+Compass
Finding your way with Sass+CompassFinding your way with Sass+Compass
Finding your way with Sass+Compass
 
Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)
 
LESS
LESSLESS
LESS
 
Css frameworks
Css frameworksCss frameworks
Css frameworks
 
CSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassCSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & Compass
 

More from Ramon Bispo

SCTI 2014 - Dicas para tomadas de decisão seguras em front-end
SCTI 2014 - Dicas para tomadas de decisão seguras em front-endSCTI 2014 - Dicas para tomadas de decisão seguras em front-end
SCTI 2014 - Dicas para tomadas de decisão seguras em front-end
Ramon Bispo
 
Café22: Just Like Music
Café22: Just Like MusicCafé22: Just Like Music
Café22: Just Like Music
Ramon Bispo
 
Mercado front-end: esteja preparado para ele
Mercado front-end: esteja preparado para eleMercado front-end: esteja preparado para ele
Mercado front-end: esteja preparado para eleRamon Bispo
 
Café22: Community-a-holic
Café22: Community-a-holicCafé22: Community-a-holic
Café22: Community-a-holic
Ramon Bispo
 
FLISOL RJ - Você tem medo de quê?
FLISOL RJ - Você tem medo de quê?FLISOL RJ - Você tem medo de quê?
FLISOL RJ - Você tem medo de quê?
Ramon Bispo
 
Semana da Computação UFF - Você tem medo de quê?
Semana da Computação UFF - Você tem medo de quê?Semana da Computação UFF - Você tem medo de quê?
Semana da Computação UFF - Você tem medo de quê?
Ramon Bispo
 
Community-a-holic
Community-a-holicCommunity-a-holic
Community-a-holic
Ramon Bispo
 
A Mágica dos Css Sprites
A Mágica dos Css SpritesA Mágica dos Css Sprites
A Mágica dos Css Sprites
Ramon Bispo
 

More from Ramon Bispo (8)

SCTI 2014 - Dicas para tomadas de decisão seguras em front-end
SCTI 2014 - Dicas para tomadas de decisão seguras em front-endSCTI 2014 - Dicas para tomadas de decisão seguras em front-end
SCTI 2014 - Dicas para tomadas de decisão seguras em front-end
 
Café22: Just Like Music
Café22: Just Like MusicCafé22: Just Like Music
Café22: Just Like Music
 
Mercado front-end: esteja preparado para ele
Mercado front-end: esteja preparado para eleMercado front-end: esteja preparado para ele
Mercado front-end: esteja preparado para ele
 
Café22: Community-a-holic
Café22: Community-a-holicCafé22: Community-a-holic
Café22: Community-a-holic
 
FLISOL RJ - Você tem medo de quê?
FLISOL RJ - Você tem medo de quê?FLISOL RJ - Você tem medo de quê?
FLISOL RJ - Você tem medo de quê?
 
Semana da Computação UFF - Você tem medo de quê?
Semana da Computação UFF - Você tem medo de quê?Semana da Computação UFF - Você tem medo de quê?
Semana da Computação UFF - Você tem medo de quê?
 
Community-a-holic
Community-a-holicCommunity-a-holic
Community-a-holic
 
A Mágica dos Css Sprites
A Mágica dos Css SpritesA Mágica dos Css Sprites
A Mágica dos Css Sprites
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 

Assets on Rails na Prática

  • 1. ASSETS ON RAILS NA PRÁTICA ENTENDENDO, 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 PIPELINE config.assets.enabled = true @RAMONPAGE
  • 5. RAILS 3.1+ ASSET PIPELINE FINGERPRINTING /stylesheets/styles.css?2509895876 styles.css => styles-908e25f4bf641868d8683022a5b62f54.css @RAMONPAGE
  • 6. ESTRUTURA DOS ASSETS NO RAILS ↳ app ↳ assets ↳ images - ... ↳ javascripts - application.js - ... ↳ stylesheets - application.css - ... ↳ ... @RAMONPAGE
  • 7. ENTENDENDO OS MANIFESTOS application.js //= require jquery //= require jquery_ujs //= require_tree . application.css /* *= require_self *= require_tree . */ @RAMONPAGE
  • 8. MAIS SOBRE ASSET PIPELINE RAILS GUIDES http://guides.rubyonrails.org/asset_pipeline.html @RAMONPAGE
  • 9. ENTENDENDO PRÉ-PROCESSADORES COFFEESCRIPT 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 ME THE CODE @RAMONPAGE
  • 13. OBRIGADO! RAMON BISPO http://ramonpage.com @ramonpage