Browse files

Added Gzip to Asset Pipeline via GitHub

  • Loading branch information...
1 parent fcebf9f commit c01c954c20e64119ea73f3b71c4d843d66fda64e @TheEmpty TheEmpty committed Jun 21, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 railties/guides/source/asset_pipeline.textile
@@ -94,6 +94,8 @@ h4. Compressing Assets
The default Gemfile also includes the "uglifier": gem. This gem wraps "UglifierJS": (written for NodeJS) in Ruby. It compress your code by removing white spaces and other magical things like changing your if and else statements to ternary operators when possible.
+Sprockets also turns on "Gzip": (.gz) when possible (by checking the user's headers). Gzip is a file compression technique, much like the ever so popular "zip" file, except it's more open source friendly. Gzip should not modify the contents of the file, but simply the size of the file.
h4. Adding Assets to Your Gems
To include your assets inside of a gem, simple package it in +lib/assets+ as you would in +app/assets+. You should append or prepend the name of your gem though, this should help avoid name conflicts with other gems or the user's application.

0 comments on commit c01c954

Please sign in to comment.