Permalink
Browse files

Update Uglify to v2

Saves 1667 bytes in zepto.min.js
  • Loading branch information...
1 parent 59d3fe5 commit 4501bf63b57420e8788abcb72e4a31efd1c692c9 Zlatan Vasović committed with mislav Feb 10, 2014
Showing with 8 additions and 5 deletions.
  1. +7 −4 make
  2. +1 −1 package.json
View
@@ -89,7 +89,10 @@ describe_version = ->
minify = (source_code) ->
uglify = require('uglify-js')
- ast = uglify.parser.parse(source_code)
- ast = uglify.uglify.ast_mangle(ast)
- ast = uglify.uglify.ast_squeeze(ast)
- uglify.uglify.gen_code(ast)
+ compressor = uglify.Compressor()
+ ast = uglify.parse(source_code)
+ ast.figure_out_scope()
+ ast.compute_char_frequency();
+ ast.mangle_names();
+ ast = ast.transform(compressor)
+ return ast.print_to_string()
View
@@ -18,7 +18,7 @@
}
]
, "devDependencies": {
- "uglify-js": "1.2.6"
+ "uglify-js": "2.4.x"
, "express": "3.1.x"
, "coffee-script": "1.5.x"
, "shelljs": "0.1.x"

0 comments on commit 4501bf6

Please sign in to comment.