Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1.25 KB

asset_pipeline.textile

File metadata and controls

33 lines (19 loc) · 1.25 KB

Asset Pipeline

This guide will cover the ideology of the asset pipeline introduced in Rails 3.1.
By referring to this guide you will be able to:

  • Properly organize your application assets
  • Understand the benefits of the asset pipline
  • Adding a preproccessor to the pipeline
  • Package assets with your plugin

endprologue.

What Is The Asset Pipeline?

Why Should I Use it?

Using the asset pipeline allows you to package javascript, CSS, or images with your Rails application, library, or plugin. It also makes it easy to create dynamic CSS with LESS and clean JavaScript with CoffeeScript to name a few of the popular preprocessors. The big difference is that they are now categorized in app/assets, treating them like first-class citizens instead of just throughing them into categorized folders in the public directory.

How to Use the Asset Pipeline

Asset Organization

Default Files Loaded

Directives

Stacking Preproccessors

Packaging Assets with Your Plugin

More on Sprockets

Sprockets is the engine that handles the asset pipeline in Rails 3.1 and above. Their offical website is avaialbe at http://getsprockets.org/ and the source code is on github.