Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Do not delete coffeescript files for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingramz committed Sep 20, 2016
1 parent a2e8d1a commit 2f72c08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion script/lib/transpile-coffee-script-paths.js
Expand Up @@ -30,5 +30,4 @@ function getPathsToTranspile () {
function transpileCoffeeScriptPath (coffeePath) {
const jsPath = coffeePath.replace(/coffee$/g, 'js')
fs.writeFileSync(jsPath, CompileCache.addPathToCache(coffeePath, CONFIG.atomHomeDirPath))
fs.unlinkSync(coffeePath)
}
9 changes: 1 addition & 8 deletions src/compile-cache.js
Expand Up @@ -74,7 +74,7 @@ function compileFileAtPath (compiler, filePath, extension) {
cacheStats[extension].hits++
} else {
cacheStats[extension].misses++
compiledCode = addSourceURL(compiler.compile(sourceCode, filePath), filePath)
compiledCode = compiler.compile(sourceCode, filePath)
writeCachedJavascript(cachePath, compiledCode)
}
return compiledCode
Expand All @@ -97,13 +97,6 @@ function writeCachedJavascript (relativeCachePath, code) {
fs.writeFileSync(cachePath, code, 'utf8')
}

function addSourceURL (jsCode, filePath) {
if (process.platform === 'win32') {
filePath = '/' + path.resolve(filePath).replace(/\\/g, '/')
}
return jsCode + '\n' + '//# sourceURL=' + encodeURI(filePath) + '\n'
}

var INLINE_SOURCE_MAP_REGEXP = /\/\/[#@]\s*sourceMappingURL=([^'"\n]+)\s*$/mg

require('source-map-support').install({
Expand Down

0 comments on commit 2f72c08

Please sign in to comment.