1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-01 13:24:10 +01:00

Add a 'compress' "target" to the build script (still needs a bit of tidy up). Going to continue using Closure Compiler for DataTables. Tried UglifyJS as well, but found that added about 11K to the size of the library when compressed, relative to Closure:

$ ls -l ../media/js
total 1272
-rw-r--r--  1 allan  wheel  316031  6 Dec 16:51 jquery.dataTables.js
-rw-r--r--  1 allan  wheel   70608  6 Dec 16:51 jquery.dataTables.min.closure.js
-rw-r--r--  1 allan  wheel   81643  6 Dec 16:51 jquery.dataTables.min.uglify.js
-rw-r--r--  1 allan  wheel   93867  3 Dec 17:49 jquery.js
This commit is contained in:
Allan Jardine 2011-12-06 16:52:44 +00:00
parent a22727c84b
commit c5172dc920

View File

@ -1,5 +1,10 @@
#!/bin/sh
# DEFAULTS
CLOSURE="/usr/local/closure_compiler/compiler.jar"
JSDOC3="/usr/local/jsdoc3/jsdoc.jar"
echo ""
echo " DataTables build"
echo ""
@ -32,3 +37,8 @@ while [ $? -eq 0 ]; do
done
mv DataTables.js.build ../js/jquery.dataTables.js
if [ "$1" = "compress" ]; then
java -jar $CLOSURE --js ../js/jquery.dataTables.js > ../js/jquery.dataTables.min.closure.js
fi