Skip to content

Commit

Permalink
Rename “bootstrap” scripts
Browse files Browse the repository at this point in the history
They’re just window initialization scripts, and this new naming makes
that a lot clearer.
  • Loading branch information
Nathan Sobo committed Oct 7, 2015
1 parent 8e988e8 commit e886d8b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/browser/atom-application.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ class AtomApplication
else
if devMode
try
bootstrapScript = require.resolve(path.join(@devResourcePath, 'src', 'window-bootstrap'))
windowInitializationScript = require.resolve(path.join(@devResourcePath, 'src', 'initialize-application-window'))
resourcePath = @devResourcePath

bootstrapScript ?= require.resolve('../window-bootstrap')
windowInitializationScript ?= require.resolve('../initialize-application-window')
resourcePath ?= @resourcePath
openedWindow = new AtomWindow({locationsToOpen, bootstrapScript, resourcePath, devMode, safeMode, windowDimensions, profileStartup})
openedWindow = new AtomWindow({locationsToOpen, windowInitializationScript, resourcePath, devMode, safeMode, windowDimensions, profileStartup})

if pidToKillWhenClosed?
@pidsToOpenWindows[pidToKillWhenClosed] = openedWindow
Expand Down Expand Up @@ -472,9 +472,9 @@ class AtomApplication
if pack?
if pack.urlMain
packagePath = @packages.resolvePackagePath(packageName)
bootstrapScript = path.resolve(packagePath, pack.urlMain)
windowInitializationScript = path.resolve(packagePath, pack.urlMain)
windowDimensions = @focusedWindow()?.getDimensions()
new AtomWindow({bootstrapScript, @resourcePath, devMode, safeMode, urlToOpen, windowDimensions})
new AtomWindow({windowInitializationScript, @resourcePath, devMode, safeMode, urlToOpen, windowDimensions})
else
console.log "Package '#{pack.name}' does not have a url main: #{urlToOpen}"
else
Expand All @@ -494,14 +494,14 @@ class AtomApplication
resourcePath = @resourcePath

try
bootstrapScript = require.resolve(path.resolve(@devResourcePath, 'spec', 'spec-bootstrap'))
windowInitializationScript = require.resolve(path.resolve(@devResourcePath, 'src', 'initialize-test-window'))
catch error
bootstrapScript = require.resolve(path.resolve(__dirname, '..', '..', 'spec', 'spec-bootstrap'))
windowInitializationScript = require.resolve(path.resolve(__dirname, '..', '..', 'src', 'initialize-test-window'))

isSpec = true
devMode = true
safeMode ?= false
new AtomWindow({bootstrapScript, resourcePath, headless, isSpec, devMode, specDirectory, logFile, safeMode})
new AtomWindow({windowInitializationScript, resourcePath, headless, isSpec, devMode, specDirectory, logFile, safeMode})

locationForPathToOpen: (pathToOpen, executedFrom='') ->
return {pathToOpen} unless pathToOpen
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ try

document.title = "Spec Suite"

testRunner = require('./jasmine-test-runner')
testRunner = require('../spec/jasmine-test-runner')
testRunner({
logFile: atom.getLoadSettings().logFile
headless: atom.getLoadSettings().headless
Expand Down
2 changes: 1 addition & 1 deletion static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
setupVmCompatibility()
setupCsonCache(CompileCache.getCacheDirectory())

require(loadSettings.bootstrapScript)
require(loadSettings.windowInitializationScript)
require('ipc').sendChannel('window-command', 'window:loaded')
}

Expand Down

0 comments on commit e886d8b

Please sign in to comment.