From 6798e1cee8dfe132b9b93b43f11899d8f5b8833c Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Sat, 10 Aug 2013 13:50:19 +0100 Subject: [PATCH] Add option to disable warnings when generating source map --- lib/output.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/output.js b/lib/output.js index 90589a2d..d7513cc2 100644 --- a/lib/output.js +++ b/lib/output.js @@ -62,6 +62,7 @@ function OutputStream(options) { comments : false, preserve_line : false, negate_iife : !(options && options.beautify), + warnings : true, }, true); var indentation = 0; @@ -285,7 +286,7 @@ function OutputStream(options) { (!name && token.type == "name") ? token.value : name ); } catch(ex) { - AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { + if (options.warnings) AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { file: token.file, line: token.line, col: token.col,