From 03a02b3921e06e2b2c17a2daeb4fc0c3cf607f4c Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 25 Jun 2014 11:07:44 -0400 Subject: [PATCH] compress with UglifyJS -- ~6k savings --- generate-combined.sh | 5 +++-- package.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/generate-combined.sh b/generate-combined.sh index 58ab0d7..ce50128 100755 --- a/generate-combined.sh +++ b/generate-combined.sh @@ -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}" diff --git a/package.json b/package.json index 92823a4..7bc2b68 100644 --- a/package.json +++ b/package.json @@ -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" -- 2.7.4