Files
galaxy/static/scripts/pack_scripts.py
T
James Taylor 4b88be5e25 1) Modified index page so progressive loading works better for slower
connections

2) Added a script for packing the javascripts, everything is now repacked
   with yui-compressor (the packed versions are slightly large, but they
   gzip better resulting in an overall reduction).
2007-12-11 19:30:03 +00:00

20 lines
539 B
Python
Executable File

#!/usr/bin/env python
from glob import glob
from subprocess import call
from shutil import copyfile
from os import path
# Scripts that should not be packed
do_not_pack = set( [ "ie_pngfix.js", "aflax.js" ] )
cmd = "java -jar ../../scripts/yuicompressor.jar --warn %(fname)s > packed/%(fname)s"
for fname in glob( "*.js" ):
d = dict( fname=fname )
print "%(fname)s --> packed/%(fname)s" % d
if fname in do_not_pack:
copyfile( fname, path.join( 'packed', fname ) )
else:
out = call( cmd % d, shell=True )