Fix coffeescript source maps.

The file paths on Windows should be URLs with proper slashes and starting with file:///
This commit is contained in:
Friedrich von Never
2015-10-12 21:22:34 +06:00
parent 69d9da1fa5
commit b19db0f0c0

View File

@@ -29,6 +29,10 @@ exports.compile = function (sourceCode, filePath) {
Error.prepareStackTrace = previousPrepareStackTrace
}
if (process.platform === 'win32') {
filePath = 'file:///' + path.resolve(filePath).replace(/\\/g, '/')
}
var output = CoffeeScript.compile(sourceCode, {
filename: filePath,
sourceFiles: [filePath],