Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sbecker committed Jun 19, 2006
1 parent f6de938 commit 39dc958
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README
Expand Up @@ -56,6 +56,19 @@ http://www.crockford.com/javascript/jsmin.html
will need to reorder files under 'base' so dependencies are loaded in correct order. Feel free
to rename or create new file packages.

Example from a fresh rails app after running the rake task. (Stylesheets is blank because a default rails app has no stylesheets yet.):

---
javascripts:
- base:
- prototype
- effects
- dragdrop
- controls
- application
stylesheets:
- base: []

Example with multiple merged files:

---
Expand All @@ -77,7 +90,7 @@ stylesheets:
- foo
- bar

3. Run the rake task "asset:packager:build_all" to generate the compressed, merged versions for each package.
3. Run the rake task "asset:packager:build_all" to generate the compressed, merged versions for each package. Whenever you rearrange the yaml file, you'll need to run this task again. Merging and compressing is expensive, so this is something we want to do once, not every time your app starts. Thats why its a rake task.

4. Use the helper functions whenever including these files in your application. See below for examples.

Expand Down Expand Up @@ -108,15 +121,14 @@ Now supports symbols and :defaults as well:
== Stylesheet Examples

Example call:
<%= stylesheet_link_merged 'screen', 'header', 'foo', 'bar' %>
<%= stylesheet_link_merged 'screen', 'header' %>

In development, this generates:
<link href="/stylesheets/screen.css" media="screen" rel="Stylesheet" type="text/css" />
<link href="/stylesheets/header.css" media="screen" rel="Stylesheet" type="text/css" />
<link href="/stylesheets/foo.css" media="screen" rel="Stylesheet" type="text/css" />
<link href="/stylesheets/bar.css" media="screen" rel="Stylesheet" type="text/css" />

In development this generates:
In production this generates:
<link href="/stylesheets/base_1150729166.css" media="screen" rel="Stylesheet" type="text/css" />

== License
Copyright (c) 2006 Scott Becker - http://synthesis.sbecker.net
Expand Down

0 comments on commit 39dc958

Please sign in to comment.