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

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