disable warnings by default in minify (pass warnings: true to enable)

close #11
This commit is contained in:
Mihai Bazon
2012-10-11 09:30:22 +03:00
parent 9cdaed9860
commit f322b32e0e

View File

@@ -64,8 +64,9 @@ for (var i in UglifyJS) {
exports.minify = function(files, options) {
options = UglifyJS.defaults(options, {
outSourceMap: null,
inSourceMap: null
outSourceMap : null,
inSourceMap : null,
warnings : false,
});
if (typeof files == "string")
files = [ files ];
@@ -82,7 +83,9 @@ exports.minify = function(files, options) {
// 2. compress
toplevel.figure_out_scope();
var sq = UglifyJS.Compressor();
var sq = UglifyJS.Compressor({
warnings: options.warnings,
});
toplevel = toplevel.transform(sq);
// 3. mangle