Skip to content

Instantly share code, notes, and snippets.

View andypike's full-sized avatar

Andy Pike andypike

View GitHub Profile
@andypike
andypike / gist:651174
Created October 28, 2010 11:38
Minify css and js using the yui compressor in rake
# APP_PATH is your application root path
# YUI_COMPRESSOR_PATH is the path to the yuicompressor-x.x.x.jar
# Files are replaced. Designed to run over the build artifacts on the CI server
desc "Minify the javascript and css files that are within the artifacts folder"
task :minify => [:copy_artifacts] do
#http://developer.yahoo.com/yui/compressor/
puts "Minifying javascript"
js_files = FileList["#{APP_PATH}/**/*.js"].exclude(/.min.js/)