From: OiNutter Date: Fri, 11 Apr 2014 15:09:56 +0000 (+0100) Subject: add sourceMappingUrl to output in node module X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ef772b0049828fef64e81ba49f564d45d880b27a;p=UglifyJS.git add sourceMappingUrl to output in node module If options.outSourceMap is specified the sourceMappingURL comment should be appended to the output stream --- diff --git a/tools/node.js b/tools/node.js index 04e67e78..084998da 100644 --- a/tools/node.js +++ b/tools/node.js @@ -126,6 +126,11 @@ exports.minify = function(files, options) { } var stream = UglifyJS.OutputStream(output); toplevel.print(stream); + + if(options.outSourceMap){ + stream += "\n//# sourceMappingURL=" + options.outSourceMap; + } + return { code : stream + "", map : output.source_map + ""