compress with UglifyJS -- ~6k savings
authorDan Vanderkam <danvdk@gmail.com>
Wed, 25 Jun 2014 15:07:44 +0000 (11:07 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Wed, 22 Oct 2014 02:31:06 +0000 (22:31 -0400)
generate-combined.sh
package.json

index 58ab0d7..ce50128 100755 (executable)
@@ -37,13 +37,14 @@ CatSources () {
 }
 
 Copyright () {
-  echo '/*! @license Copyright 2011 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */'
+  echo '/*! @license Copyright 2014 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */'
 }
 
 CatCompressed () {
   Copyright
   CatSources \
-  | java -jar yuicompressor-2.4.2.jar --type js
+  | grep -v '"use strict";' \
+  | node_modules/uglify-js/bin/uglifyjs -c -m
 }
 
 ACTION="${1:-update}"
index 92823a4..7bc2b68 100644 (file)
@@ -31,7 +31,8 @@
   "devDependencies": {
     "phantomjs": "^1.9.7-8",
     "closure-compiler": "^0.2.6",
-    "obvious-closure-library": "^20140401.0.2"
+    "obvious-closure-library": "^20140401.0.2",
+    "uglify-js": "^2"
   },
   "scripts": {
     "test": "make test"