added no source map comment option to progammatic api

This commit is contained in:
qyoz 2016-07-11 12:41:49 +03:00
parent a9aa85517f
commit 0ae7c36a39

View File

@ -138,7 +138,7 @@ exports.minify = function(files, options) {
toplevel.print(stream);
var mappingUrlPrefix = "\n//# sourceMappingURL=";
if (options.outSourceMap && typeof options.outSourceMap === "string") {
if (options.outSourceMap && typeof options.outSourceMap === "string" && options.sourceMapUrl !== false) {
stream += mappingUrlPrefix + (typeof options.sourceMapUrl === "string" ? options.sourceMapUrl : options.outSourceMap);
}