Skip to content

Commit

Permalink
Update Uglify to v2
Browse files Browse the repository at this point in the history
Saves 1667 bytes in zepto.min.js
  • Loading branch information
Zlatan Vasović authored and mislav committed Feb 10, 2014
1 parent 59d3fe5 commit 4501bf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions make
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4501bf6

Please sign in to comment.