mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Make sourcemaps work for bable & typescript on Windows
This commit is contained in:
@@ -49,6 +49,10 @@ exports.compile = function (sourceCode, filePath) {
|
||||
Logger.prototype.verbose = noop
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
filePath = 'file:///' + path.resolve(filePath).replace(/\\/g, '/')
|
||||
}
|
||||
|
||||
var options = {filename: filePath}
|
||||
for (var key in defaultOptions) {
|
||||
options[key] = defaultOptions[key]
|
||||
|
||||
@@ -37,6 +37,10 @@ exports.compile = function (sourceCode, filePath) {
|
||||
TypeScriptSimple = require('typescript-simple').TypeScriptSimple
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
filePath = 'file:///' + path.resolve(filePath).replace(/\\/g, '/')
|
||||
}
|
||||
|
||||
var options = _.defaults({filename: filePath}, defaultOptions)
|
||||
return new TypeScriptSimple(options, false).compile(sourceCode, filePath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user