use relative location when generating the sourceMapName in bin/6to5 for directories - fixes #775

This commit is contained in:
Sebastian McKenzie
2015-02-13 23:08:47 +11:00
parent 71d5d4fb2c
commit e195d6ca55

View File

@@ -16,7 +16,10 @@ module.exports = function (commander, filenames, opts) {
var dest = path.join(commander.outDir, relative);
var data = util.compile(src, { sourceMapName: dest });
var data = util.compile(src, {
// sourceMapName is the destination relative to the source
sourceMapName: path.relative(dest + '/..', src)
});
if (commander.sourceMaps) {
var mapLoc = dest + ".map";