public
Description: Shoebox helps you manage styles and scripts as first-class citizens in Rails.
Homepage:
Clone URL: git://github.com/ddollar/shoebox.git
Click here to lend your support to: shoebox and make a donation at www.pledgie.com !
David Dollar (author)
Tue Jun 16 20:48:34 -0700 2009
commit  4bf253a78643c93c3bcd7766fcea3610fed01100
tree    1d8dc5d41144e74e59f62bab0b5d325fb084f1bd
parent  b05f7b3d30baae386e85ee5342a0092cdee696dc
shoebox / README.rdoc
100644 53 lines (40 sloc) 1.023 kb

Shoebox allows you to keep your scripts and styles as first-class citizens in your Rails application.

Shoebox also helps you separate script and style logic down to controller-level granularity.

Shoebox can optionally minify both CSS and Javascript.

Installation

 # install the plugin
 $ script/plugin install git://github.com/ddollar/shoebox.git

Setup

 # css
 # can use media types in the filename like below
 app/
   styles/
     application/
       test.css
       test.screen.css
       test.sass
       test.less
     users/
       more.css
       more.print.css

  # javascript
  app/
    scripts/
      application/
        global.js
      users/
        flashy.js

Usage

  # views/layouts/application.html.erb
  <head>
    <%= shoebox_scripts        %>
    <%= shoebox_styles         %> # defaults to screen
    <%= shoebox_styles(:print) %>
  </head>

  # config/environments/production.rb
  Shoebox.config.cache  = true
  Shoebox.config.minify = true

Author

  David Dollar
  ddollar@gmail.com
  @ddollar