mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Resolve bootstrap scripts against dev resource path
This commit is contained in:
@@ -276,13 +276,21 @@ class AtomApplication
|
||||
if resourcePath isnt @resourcePath and not fs.existsSync(resourcePath)
|
||||
resourcePath = @resourcePath
|
||||
|
||||
bootstrapScript = require.resolve('../spec/spec-bootstrap')
|
||||
try
|
||||
bootstrapScript = require.resolve(path.resolve(global.devResourcePath, 'spec', 'spec-bootstrap'))
|
||||
catch error
|
||||
bootstrapScript = require.resolve(path.resolve(__dirname, '..', 'spec', 'spec-bootstrap'))
|
||||
|
||||
isSpec = true
|
||||
devMode = true
|
||||
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory})
|
||||
|
||||
runBenchmarks: ->
|
||||
bootstrapScript = 'benchmark/benchmark-bootstrap'
|
||||
try
|
||||
bootstrapScript = require.resolve(path.resolve(global.devResourcePath, 'benchmark', 'benchmark-bootstrap'))
|
||||
catch error
|
||||
bootstrapScript = require.resolve(path.resolve(__dirname, '..', 'benchmark', 'benchmark-bootstrap'))
|
||||
|
||||
isSpec = true # Needed because this flag adds the spec directory to the NODE_PATH
|
||||
new AtomWindow({bootstrapScript, @resourcePath, isSpec})
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
args.pathsToOpen = args.pathsToOpen.map (pathToOpen) ->
|
||||
path.resolve(args.executedFrom ? process.cwd(), pathToOpen)
|
||||
|
||||
require('coffee-script')
|
||||
if args.devMode
|
||||
require('coffee-script')
|
||||
require(path.join(args.resourcePath, 'src', 'coffee-cache'))
|
||||
require('module').globalPaths.push(path.join(args.resourcePath, 'src'))
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user