Created
January 20, 2012 13:33
-
-
Save juanghurtado/1647388 to your computer and use it in GitHub Desktop.
Rake tasks to compress CSS/JS through YUI Compressor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nanoc3/tasks' | |
desc 'Compress CSS files in output/style directory using YUI Compressor' | |
task :css do | |
puts `find output/css -name '*.css' -exec java -jar ./lib/yuicompressor-2.4.2.jar --type css '{}' -o '{}' \\;` | |
end | |
desc 'Compress JavaScript files in output/script directory using YUI Compressor' | |
task :js do | |
puts `find output/js -name '*.js' -exec java -jar ./lib/yuicompressor-2.4.2.jar --type js '{}' -o '{}' \\;` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment