From f322b32e0e8df5b60f577da401922f11048f2f87 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Thu, 11 Oct 2012 09:30:22 +0300 Subject: [PATCH] disable warnings by default in `minify` (pass warnings: true to enable) close #11 --- tools/node.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/node.js b/tools/node.js index a35dcd2f..07c3bfae 100644 --- a/tools/node.js +++ b/tools/node.js @@ -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 -- 2.34.1