Skip to content

Commit

Permalink
Works with latest version of uglify-js.
Browse files Browse the repository at this point in the history
  • Loading branch information
bennlich committed Apr 15, 2013
1 parent 42bb9a0 commit 7dd4560
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/genclient.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*globals require exports process*/

var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;
var UglifyJS = require("uglify-js");
var fs = require("fs");
var Buffer = require('buffer').Buffer;

Expand Down Expand Up @@ -34,10 +33,7 @@ var concatenateClientFiles = function () {
* @return {String} The minified client code.
*/
var minifyClientFiles = function (code) {
var ast = jsp.parse(code);
ast = pro.ast_mangle(ast);
ast = pro.ast_squeeze(ast);
return pro.gen_code(ast);
return UglifyJS.minify(code, {fromString: true}).code;
};

/**
Expand Down

0 comments on commit 7dd4560

Please sign in to comment.