Asset Pipeline

It preprocesses, minifies, and concatenates your assets.

What are assets?

What is preprocessing?

What is concatenating?

What is minifying?

Why should I care?

What are assets?

(... and why should I care?)

From the docs.

 

http://guides.rubyonrails.org/asset_pipeline.html

gem 'sprockets-rails'

The solution in tech terms

1. Preprocessing Files

<%= ERB %>

The solution in tech terms

2. Concatenate Files

I think it's kinda like concatenating strings...

 

 

but with files.

The solution in tech terms

3. Minify or compress

Remove returns and white spaces

How does it happen?

It's managed in the Manifest File

Using Directives

So many assets!

  • app/assets - code that you write

 

  • vendor/assets - third party stuff (jQuery)

 

  • lib/assets - somewhere in between

El Fin

Asset Pipeline

By Eddie G

Asset Pipeline

  • 58
Loading comments...

More from Eddie G