From: Dan Vanderkam Date: Wed, 25 Jun 2014 15:07:44 +0000 (-0400) Subject: compress with UglifyJS -- ~6k savings X-Git-Tag: v1.1.0~54 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=d218710ca7fea5f153c6b80cda3cdcacf72066a1;p=dygraphs.git compress with UglifyJS -- ~6k savings --- 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"