Home > cache-with-yuicompressor

cache-with-yuicompressor

Cache-with-yuicompressor is a project mainly written in Ruby, based on the MIT license.

This gem sets up javascript and CSS bundle file compression using the YUI Compressor.

= cache-with-yuicompressor

This gem sets up javascript and CSS bundle file compression using the YUI Compressor.

For example, using javascript_include_tag "prototype", "cart", "checkout", :cache => "shop"

creates a combined javascript file named shop.js. With this gem, YUI compressor will also be run on shop.js, resulting in a smaller, obfuscated file.

Don't forget to use GZip to further compress your asset files.

== Installation

cache-with-yuicompressor is provided as a gem. Simply include it in your environment.rb or Gemfile.

config.gem "cache-with-yuicompressor"

Alternatively it can be installed as a plugin.

script/plugin install git://github.com/amolk/cache-with-yuicompressor.git

== And that's it!

All generated javascript and css files will be automatically compressed using YUI Compressor.