Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
rucksack is a Rails plug-in to pack and compress CSS- and JavaScript-files with the YUI Compressor. It's easy extendable to use other compressors like Packer, JSMin and CSSTidy.
Ruby
tree: 70769add2d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tasks
vendor
README.textile
Rakefile
init.rb

README.textile

Rucksack is a Rails plug-in to pack and compress CSS- and JavaScript-files with the YUI Compressor. It’s easy extendable to use other compressor-options like Packer, JSMin and CSSTidy.

Renaming for files managed by Git or SVN (as seen in earlier asset_package versions) are planned.

Inspired by asset_package and asset_compressor.

Install

Install the plug-in from github:

script/plugin git://github.com/yolk/rucksack.git

Create config/rucksack.yml:

rake rucksack:install

Please reorder and remove files in config/rucksack.yml so dependencies are loaded in correct order.

Deploy

Run rake rucksack:pack on every deploy before restaring your appserver(s). Rucksack will silently fall back to your uncompressed assets when the files are missing.

If you use capistrano for deployment:

@
desc “Pack assets”
task :pack_assets, :roles => [:web,:app] do
run “cd #{release_path} && rake RAILS_ENV=#{rails_env} rucksack:pack”
end
after “deploy:update_code”, “deploy:pack_assets”
@@

Something went wrong with that request. Please try again.