mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
browser -> main-process
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = (grunt) ->
|
||||
'exports'
|
||||
'spec'
|
||||
'src'
|
||||
'src/browser'
|
||||
'src/main-process'
|
||||
'static'
|
||||
'vendor'
|
||||
]
|
||||
|
||||
@@ -107,7 +107,7 @@ module.exports = (grunt) ->
|
||||
runMainProcessSpecs = (callback) ->
|
||||
appPath = getAppPath()
|
||||
resourcePath = process.cwd()
|
||||
mainProcessSpecsPath = path.resolve('spec/browser')
|
||||
mainProcessSpecsPath = path.resolve('spec/main-process')
|
||||
|
||||
if process.platform in ['darwin', 'linux']
|
||||
options =
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"productName": "Atom",
|
||||
"version": "1.9.0-dev",
|
||||
"description": "A hackable text editor for the 21st Century.",
|
||||
"main": "./src/browser/main.js",
|
||||
"main": "./src/main-process/main.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/atom/atom.git"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
path = require 'path'
|
||||
fs = require 'fs-plus'
|
||||
temp = require 'temp'
|
||||
AtomPortable = require '../src/browser/atom-portable'
|
||||
AtomPortable = require '../src/main-process/atom-portable'
|
||||
|
||||
portableModeCommonPlatformBehavior = (platform) ->
|
||||
describe "with ATOM_HOME environment variable", ->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ChildProcess = require 'child_process'
|
||||
Spawner = require '../src/browser/spawner'
|
||||
Spawner = require '../src/main-process/spawner'
|
||||
|
||||
describe "Spawner", ->
|
||||
beforeEach ->
|
||||
@@ -18,7 +18,7 @@ describe "Spawner", ->
|
||||
|
||||
it "invokes passed callback", ->
|
||||
someCallback = jasmine.createSpy('someCallback')
|
||||
|
||||
|
||||
Spawner.spawn('some-command', 'some-args', someCallback)
|
||||
|
||||
waitsFor ->
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
fs = require 'fs-plus'
|
||||
path = require 'path'
|
||||
temp = require 'temp'
|
||||
SquirrelUpdate = require '../src/browser/squirrel-update'
|
||||
Spawner = require '../src/browser/spawner'
|
||||
WinPowerShell = require '../src/browser/win-powershell'
|
||||
WinRegistry = require '../src/browser/win-registry'
|
||||
SquirrelUpdate = require '../src/main-process/squirrel-update'
|
||||
Spawner = require '../src/main-process/spawner'
|
||||
WinPowerShell = require '../src/main-process/win-powershell'
|
||||
WinRegistry = require '../src/main-process/win-registry'
|
||||
|
||||
# Run passed callback as Spawner.spawn() would do
|
||||
invokeCallback = (callback) ->
|
||||
@@ -70,14 +70,14 @@ describe "Windows Squirrel Update", ->
|
||||
|
||||
beforeEach ->
|
||||
desktopShortcutPath = path.join(tempHomeDirectory, 'Desktop', 'Atom.lnk')
|
||||
|
||||
|
||||
jasmine.unspy(Spawner, 'spawn')
|
||||
spyOn(Spawner, 'spawn').andCallFake (command, args, callback) ->
|
||||
if path.basename(command) is 'Update.exe' and args?[0] is '--createShortcut'
|
||||
fs.writeFileSync(desktopShortcutPath, '')
|
||||
else
|
||||
# simply ignore other commands
|
||||
|
||||
|
||||
invokeCallback callback
|
||||
|
||||
it "does not exist before install", ->
|
||||
|
||||
@@ -21,7 +21,7 @@ start = ->
|
||||
return
|
||||
else if args.test and args.mainProcess
|
||||
console.log = previousConsoleLog
|
||||
testRunner = require(path.join(args.resourcePath, 'spec/browser/mocha-test-runner'))
|
||||
testRunner = require(path.join(args.resourcePath, 'spec/main-process/mocha-test-runner'))
|
||||
app.on 'ready', -> testRunner(args.pathsToOpen)
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@ start = ->
|
||||
app.removeListener 'open-file', addPathToOpen
|
||||
app.removeListener 'open-url', addUrlToOpen
|
||||
|
||||
AtomApplication = require path.join(args.resourcePath, 'src', 'browser', 'atom-application')
|
||||
AtomApplication = require path.join(args.resourcePath, 'src', 'main-process', 'atom-application')
|
||||
AtomApplication.open(args)
|
||||
|
||||
console.log("App load time: #{Date.now() - global.shellStartTime}ms") unless args.test
|
||||
@@ -128,7 +128,7 @@ parseCommandLine = ->
|
||||
options.alias('1', 'one').boolean('1').describe('1', 'This option is no longer supported.')
|
||||
options.boolean('include-deprecated-apis').describe('include-deprecated-apis', 'This option is not currently supported.')
|
||||
options.alias('d', 'dev').boolean('d').describe('d', 'Run in development mode.')
|
||||
options.alias('f', 'foreground').boolean('f').describe('f', 'Keep the browser process in the foreground.')
|
||||
options.alias('f', 'foreground').boolean('f').describe('f', 'Keep the main process in the foreground.')
|
||||
options.alias('h', 'help').boolean('h').describe('h', 'Print this usage message.')
|
||||
options.alias('l', 'log-file').string('l').describe('l', 'Log all output to file.')
|
||||
options.alias('n', 'new-window').boolean('n').describe('n', 'Open a new window.')
|
||||
Reference in New Issue
Block a user