madrobby (owner)

Revisions

gist: 53733 Download_button fork
public
Public Clone URL: git://gist.github.com/53733.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
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