diff --git a/lib/coffeescript/command.js b/lib/coffeescript/command.js index 1c75508f..10fa62f8 100644 --- a/lib/coffeescript/command.js +++ b/lib/coffeescript/command.js @@ -534,7 +534,7 @@ // same directory as the `.js` file. writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap = null) { var compile, jsDir, sourceMapPath; - sourceMapPath = outputPath(sourcePath, base, ".js.map"); + sourceMapPath = `${jsPath}.map`; jsDir = path.dirname(jsPath); compile = function() { if (opts.compile) { diff --git a/src/command.coffee b/src/command.coffee index eb5d817a..41dae3f6 100644 --- a/src/command.coffee +++ b/src/command.coffee @@ -401,7 +401,7 @@ mkdirp = (dir, fn) -> # If `generatedSourceMap` is provided, this will write a `.js.map` file into the # same directory as the `.js` file. writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) -> - sourceMapPath = outputPath sourcePath, base, ".js.map" + sourceMapPath = "#{jsPath}.map" jsDir = path.dirname jsPath compile = -> if opts.compile