Use relative requires

This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-05-29 14:22:57 -07:00
parent 1470ae73e7
commit 608fcbd0a1
3 changed files with 5 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
AtomWindow = require 'atom-window'
AtomWindow = require './atom-window'
BrowserWindow = require 'browser_window'
Menu = require 'menu'
app = require 'app'

View File

@@ -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

View File

@@ -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']