Merge pull request #3051 from CaseyLeask/source-map-syntax-update

Updated the Source Maps syntax
This commit is contained in:
Michael Ficarra
2013-07-04 07:03:00 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ if btoa? and JSON? and unescape? and encodeURIComponent?
options.sourceMap = true
options.inline = true
{js, v3SourceMap} = CoffeeScript.compile code, options
"#{js}\n//@ sourceMappingURL=data:application/json;base64,#{btoa unescape encodeURIComponent v3SourceMap}\n//@ sourceURL=coffeescript"
"#{js}\n//# sourceMappingURL=data:application/json;base64,#{btoa unescape encodeURIComponent v3SourceMap}\n//# sourceURL=coffeescript"
# Load a remote script from the current domain via XHR.
CoffeeScript.load = (url, callback, options = {}) ->

View File

@@ -273,7 +273,7 @@ writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) ->
compile = ->
if opts.compile
js = ' ' if js.length <= 0
if generatedSourceMap then js = "#{js}\n/*\n//@ sourceMappingURL=#{helpers.baseFileName sourceMapPath, no, useWinPathSep}\n*/\n"
if generatedSourceMap then js = "#{js}\n//# sourceMappingURL=#{helpers.baseFileName sourceMapPath, no, useWinPathSep}\n"
fs.writeFile jsPath, js, (err) ->
if err
printLine err.message