diff --git a/bin/handlebars b/bin/handlebars index 5b1ba89c9..4835770f9 100755 --- a/bin/handlebars +++ b/bin/handlebars @@ -203,10 +203,7 @@ if (!argv.simple) { output = output.join(''); if (argv.min) { - var ast = uglify.parser.parse(output); - ast = uglify.uglify.ast_mangle(ast); - ast = uglify.uglify.ast_squeeze(ast); - output = uglify.uglify.gen_code(ast); + output = uglify.minify(output, {fromString: true}).code; } if (argv.output) { diff --git a/package.json b/package.json index ab3f6831e..af8db6855 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "optimist": "~0.3", - "uglify-js": "~1.2" + "uglify-js": "~2.3" }, "devDependencies": { "benchmark": "~1.0",