[node.js] Add inSourceMapFromString option so one can pass in the sourcemap contents in inSourceMap.

This commit is contained in:
David Caldwell 2014-05-26 18:17:52 -07:00
parent 7bf59b5bcd
commit c7bb60cab0

View File

@ -103,7 +103,7 @@ exports.minify = function(files, options) {
// 4. output // 4. output
var inMap = options.inSourceMap; var inMap = options.inSourceMap;
var output = {}; var output = {};
if (typeof options.inSourceMap == "string") { if (typeof options.inSourceMap == "string" && !options.inSourceMapFromString) {
inMap = fs.readFileSync(options.inSourceMap, "utf8"); inMap = fs.readFileSync(options.inSourceMap, "utf8");
} }
if (options.outSourceMap) { if (options.outSourceMap) {