+7
-3
@@ -1,2 +0,2 @@ | ||
| // Generated by CoffeeScript 1.6.3 | ||
| // Generated by CoffeeScript 1.8.0 | ||
| var SourceMapConsumer, SourceMapGenerator, path, readFileSync, writeFileSync, _ref, _ref1; | ||
@@ -10,3 +10,3 @@ | ||
| exports.cat = function(inputMapFiles, outJSFile, outMapFile) { | ||
| exports.cat = function(inputMapFiles, outJSFile, outMapFile, maproot) { | ||
| var buffer, f, generator, lineOffset, map, src, srcPath, _i, _len; | ||
@@ -43,5 +43,9 @@ buffer = []; | ||
| } | ||
| buffer.push("//# sourceMappingURL=" + (path.relative(path.dirname(outJSFile), outMapFile))); | ||
| if (maproot === null) { | ||
| buffer.push("//# sourceMappingURL=" + (path.relative(path.dirname(outJSFile), outMapFile))); | ||
| } else { | ||
| buffer.push("//# sourceMappingURL=" + (maproot + path.relative(path.dirname(outJSFile), outMapFile))); | ||
| } | ||
| writeFileSync(outJSFile, buffer.join('\n'), 'utf-8'); | ||
| return writeFileSync(outMapFile, generator.toString(), 'utf-8'); | ||
| }; |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "main": "lib", | ||
| "version": "0.2.0", | ||
| "version": "0.3.0", | ||
| "engines": { "node" : ">=0.4.0" }, | ||
@@ -8,0 +8,0 @@ "maintainers": [{ |
+5
-2
@@ -5,3 +5,3 @@ {readFileSync, writeFileSync} = require('fs') | ||
| exports.cat = (inputMapFiles, outJSFile, outMapFile) -> | ||
| exports.cat = (inputMapFiles, outJSFile, outMapFile, maproot) -> | ||
| buffer = [] | ||
@@ -37,5 +37,8 @@ generator = new SourceMapGenerator | ||
| buffer.push "//# sourceMappingURL=#{path.relative(path.dirname(outJSFile), outMapFile)}" | ||
| if maproot == null | ||
| buffer.push "//# sourceMappingURL=#{path.relative(path.dirname(outJSFile), outMapFile)}" | ||
| else | ||
| buffer.push "//# sourceMappingURL=#{maproot + path.relative(path.dirname(outJSFile), outMapFile)}" | ||
| writeFileSync(outJSFile, buffer.join('\n'), 'utf-8') | ||
| writeFileSync(outMapFile, generator.toString(), 'utf-8') |
Sorry, the diff of this file is not supported yet
23086
2.1%470
0.86%