fix `inSourceMap` in `minify` (should read the file)
authorMihai Bazon <mihai@bazon.net>
Mon, 8 Oct 2012 18:22:20 +0000 (21:22 +0300)
committerMihai Bazon <mihai@bazon.net>
Mon, 8 Oct 2012 18:22:20 +0000 (21:22 +0300)
tools/node.js

index e5046e2..bf47aba 100644 (file)
@@ -94,7 +94,7 @@ exports.minify = function(files, options) {
     var map = null;
     if (options.outSourceMap) map = UglifyJS.SourceMap({
         file: options.outSourceMap,
-        orig: options.inSourceMap
+        orig: fs.readFileSync(options.inSourceMap, "utf8")
     });
     var stream = UglifyJS.OutputStream({ source_map: map });
     toplevel.print(stream);