diff options
author | Mohammad Typaldos <mohammad.elabid@gmail.com> | 2011-06-21 04:23:35 -0700 |
---|---|---|
committer | Mohammad Typaldos <mohammad.elabid@gmail.com> | 2011-06-21 04:23:35 -0700 |
commit | c01c954c20e64119ea73f3b71c4d843d66fda64e (patch) | |
tree | 5552b93030ee8ce1d48207c28dd7bff3d67ea51a /railties/guides/source | |
parent | fcebf9fd93ed1dc9369f65ad91170d34653df404 (diff) | |
download | rails-c01c954c20e64119ea73f3b71c4d843d66fda64e.tar.gz rails-c01c954c20e64119ea73f3b71c4d843d66fda64e.tar.bz2 rails-c01c954c20e64119ea73f3b71c4d843d66fda64e.zip |
Added Gzip to Asset Pipeline via GitHub
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/asset_pipeline.textile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index d0c1faa80d..78683b743c 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -94,6 +94,8 @@ h4. Compressing Assets The default Gemfile also includes the "uglifier":https://github.com/lautis/uglifier gem. This gem wraps "UglifierJS":https://github.com/mishoo/UglifyJS (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":http://en.wikipedia.org/wiki/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. |