mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Use relative requires
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
AtomWindow = require 'atom-window'
|
||||
AtomWindow = require './atom-window'
|
||||
BrowserWindow = require 'browser_window'
|
||||
Menu = require 'menu'
|
||||
app = require 'app'
|
||||
|
||||
@@ -6,7 +6,7 @@ class AtomWindow
|
||||
browserWindow: null
|
||||
|
||||
constructor: ({bootstrapScript, resourcePath, @pathToOpen, exitWhenDone, @isSpec}) ->
|
||||
require('atom-application').addWindow(this)
|
||||
require('./atom-application').addWindow(this)
|
||||
|
||||
@browserWindow = new BrowserWindow show: false, title: 'Atom'
|
||||
@handleEvents()
|
||||
@@ -19,7 +19,7 @@ class AtomWindow
|
||||
|
||||
handleEvents: ->
|
||||
@browserWindow.on 'destroyed', =>
|
||||
require('atom-application').removeWindow(this)
|
||||
require('./atom-application').removeWindow(this)
|
||||
|
||||
if @isSpec
|
||||
# Spec window's web view should always have focus
|
||||
|
||||
@@ -3,19 +3,16 @@ path = require 'path'
|
||||
delegate = require 'atom_delegate'
|
||||
optimist = require 'optimist'
|
||||
nslog = require('nslog')
|
||||
AtomApplication = require('./atom-application')
|
||||
|
||||
console.log = (args...) ->
|
||||
nslog(args.map((arg) -> JSON.stringify(arg)).join(" "))
|
||||
|
||||
require 'coffee-script'
|
||||
|
||||
atomApplication = null
|
||||
|
||||
delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
commandLineArgs = parseCommandLine()
|
||||
require('module').globalPaths.push(path.join(commandLineArgs.resourcePath, 'src'))
|
||||
AtomApplication = require('atom-application')
|
||||
atomApplication = new AtomApplication(commandLineArgs)
|
||||
new AtomApplication(commandLineArgs)
|
||||
|
||||
getHomeDir = ->
|
||||
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
||||
|
||||
Reference in New Issue
Block a user