Permalink
Browse files

Fixed jakefile to be able to output minified or not minified code

  • Loading branch information...
1 parent d58efef commit 6f1ef12f563b0018c5be472a5f6d8b9cd799cf40 zoibot committed Jan 2, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 Jakefile.js
View
@@ -14,13 +14,15 @@ task('minify', [], function(params) {
all += fs.readFileSync(file).toString();
});
- var ast = uglify.parser.parse(all);
var out = fs.openSync('pub/all.js', 'w+');
if(!params) {
+ var ast = uglify.parser.parse(all);
ast = uglify.uglify.ast_mangle(ast);
ast = uglify.uglify.ast_squeeze(ast);
+ fs.writeSync(out, uglify.uglify.gen_code(ast));
+ } else {
+ fs.writeSync(out, all);
}
- fs.writeSync(out, uglify.uglify.gen_code(ast));
});
task('default', [], function(params) {

0 comments on commit 6f1ef12

Please sign in to comment.