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)
Thu Jul 30 12:51:49 -0700 2009
commit  a142b6e98cb2f83351debdff241fb62916db8154
tree    0d1271014a2cda0655e1984e537e901dbc327567
parent  e718ea5c5170761547399586f0bf7f03884f4093
name age message
file .gitignore Thu Jul 30 12:13:18 -0700 2009 ignore the sass-cache [ddollar]
file MIT-LICENSE Tue May 19 14:48:36 -0700 2009 initial commit [ddollar]
file README.rdoc Tue Jun 16 20:48:34 -0700 2009 add support for less [ddollar]
file Rakefile Tue May 19 14:48:36 -0700 2009 initial commit [ddollar]
directory app/ Thu Jul 30 12:51:49 -0700 2009 break out to single files in development [ddollar]
directory config/ Thu Jul 30 12:51:49 -0700 2009 break out to single files in development [ddollar]
file init.rb Tue May 19 14:48:36 -0700 2009 initial commit [ddollar]
directory lib/ Thu Jul 30 12:51:49 -0700 2009 break out to single files in development [ddollar]
directory spec/ Thu Jul 30 12:51:49 -0700 2009 break out to single files in development [ddollar]
directory tasks/ Tue May 19 14:48:36 -0700 2009 initial commit [ddollar]
README.rdoc

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