Load CoffeeScript when using a custom resource path

Load CoffeeScript early whenever the resource path a subdirectory
from process.resourcesPath

Close #3993
This commit is contained in:
Kevin Sawicki
2014-10-29 10:21:23 -07:00
parent 3df72ec173
commit 0c590d6170
2 changed files with 5 additions and 3 deletions

View File

@@ -192,7 +192,7 @@ resolveModulePath = (relativePath, parentModule) ->
return
registerBuiltins = (devMode) ->
if devMode
if devMode or not cache.resourcePath.startsWith("#{process.resourcesPath}#{path.sep}")
fs = require 'fs-plus'
atomCoffeePath = path.join(cache.resourcePath, 'exports', 'atom.coffee')
cache.builtins.atom = atomCoffeePath if fs.isFileSync(atomCoffeePath)