Commit ecb33390 authored by Mike Bostock's avatar Mike Bostock
Browse files

Switch to UglifyJS2.

parent 835c3e12
# See the README for installation instructions.
NODE_PATH ?= ./node_modules
JS_COMPILER = $(NODE_PATH)/uglify-js/bin/uglifyjs
JS_BEAUTIFIER = $(NODE_PATH)/uglify-js/bin/uglifyjs -b -i 2 -nm -ns
JS_UGLIFY = $(NODE_PATH)/uglify-js2/bin/uglifyjs2
JS_TESTER = $(NODE_PATH)/vows/bin/vows
LOCALE ?= en_US
......@@ -236,11 +235,13 @@ test: all
%.min.js: %.js Makefile
@rm -f $@
$(JS_COMPILER) < $< > $@
$(JS_UGLIFY) $< -c -m -o $@
d3%js: Makefile
@rm -f $@
cat $(filter %.js,$^) | $(JS_BEAUTIFIER) > $@
@cat $(filter %.js,$^) > $@.tmp
$(JS_UGLIFY) $@.tmp -b indent-level=2 -o $@
@rm $@.tmp
@chmod a-w $@
component.json: src/component.js
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,7 +32,7 @@
"sizzle": "1.1.x"
},
"devDependencies": {
"uglify-js": "1.3.3",
"uglify-js2": "2.1.6",
"vows": "0.6.x",
"canvas": "0.13.0"
},
......
......@@ -21,7 +21,7 @@ require("util").puts(JSON.stringify({
"sizzle": "1.1.x"
},
"devDependencies": {
"uglify-js": "1.3.3",
"uglify-js2": "2.1.6",
"vows": "0.6.x",
"canvas": "0.13.0" // for node-canvas example
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment