mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #12653 from atom/dg-fix-sourcemaps-windows
Fix source maps for typescript and babel 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]
|
||||
|
||||
@@ -64,10 +64,6 @@ function start () {
|
||||
app.removeListener('open-url', addUrlToOpen)
|
||||
const AtomApplication = require(path.join(args.resourcePath, 'src', 'main-process', 'atom-application'))
|
||||
AtomApplication.open(args)
|
||||
|
||||
if (!args.test) {
|
||||
console.log(`App load time: ${Date.now() - global.shellStartTime}ms`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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