Skip to content

Instantly share code, notes, and snippets.

@madrobby madrobby/gist:53733
Created Jan 28, 2009

Embed
What would you like to do?
def pack_file(source, target)
puts `java -jar lib/yuicompressor-2.4.1.jar -v #{source} -o #{target}`
`gzip -9 #{target} -c > #{target}.gzip`
puts "#{source}: #{'%.1f' % (File.size(source)/1024.0)}k"
puts "Packed: #{'%.1f' % (File.size(target)/1024.0)}k"
puts "Packed+GZIP: #{'%.1f' % (File.size(target+'.gzip')/1024.0)}k"
puts
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.