add sourceMappingUrl to output in node module

If options.outSourceMap is specified the sourceMappingURL comment
should be appended to the output stream
This commit is contained in:
OiNutter
2014-04-11 16:09:56 +01:00
committed by Eric Bednarz
parent 6fcabbde08
commit ef772b0049

View File

@@ -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 + ""