mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Use relative paths for requires
This commit is contained in:
@@ -54,8 +54,8 @@ class Config
|
||||
# Private: Created during initialization, available as `global.config`
|
||||
constructor: ->
|
||||
@defaultSettings =
|
||||
core: _.clone(require('root-view').configDefaults)
|
||||
editor: _.clone(require('editor').configDefaults)
|
||||
core: _.clone(require('./root-view').configDefaults)
|
||||
editor: _.clone(require('./editor').configDefaults)
|
||||
@settings = {}
|
||||
@configFilePath = fsUtils.resolve(configDirPath, 'config', ['json', 'cson'])
|
||||
@configFilePath ?= path.join(configDirPath, 'config.cson')
|
||||
|
||||
@@ -30,10 +30,10 @@ window.setUpEnvironment = (windowMode) ->
|
||||
atom.windowMode = windowMode
|
||||
window.resourcePath = remote.getCurrentWindow().loadSettings.resourcePath
|
||||
|
||||
Config = require 'config'
|
||||
Syntax = require 'syntax'
|
||||
Pasteboard = require 'pasteboard'
|
||||
Keymap = require 'keymap'
|
||||
Config = require './config'
|
||||
Syntax = require './syntax'
|
||||
Pasteboard = require './pasteboard'
|
||||
Keymap = require './keymap'
|
||||
|
||||
window.rootViewParentSelector = 'body'
|
||||
window.config = new Config
|
||||
@@ -83,11 +83,11 @@ window.unloadEditorWindow = ->
|
||||
|
||||
window.installAtomCommand = (callback) ->
|
||||
commandPath = path.join(window.resourcePath, 'atom.sh')
|
||||
require('command-installer').install(commandPath, callback)
|
||||
require('./command-installer').install(commandPath, callback)
|
||||
|
||||
window.installApmCommand = (callback) ->
|
||||
commandPath = path.join(window.resourcePath, 'node_modules', '.bin', 'apm')
|
||||
require('command-installer').install(commandPath, callback)
|
||||
require('./command-installer').install(commandPath, callback)
|
||||
|
||||
window.onDrop = (e) ->
|
||||
e.preventDefault()
|
||||
@@ -96,8 +96,8 @@ window.onDrop = (e) ->
|
||||
atom.open({pathsToOpen}) if pathsToOpen.length > 0
|
||||
|
||||
window.deserializeEditorWindow = ->
|
||||
RootView = require 'root-view'
|
||||
Project = require 'project'
|
||||
RootView = require './root-view'
|
||||
Project = require './project'
|
||||
|
||||
windowState = atom.getWindowState()
|
||||
|
||||
@@ -152,7 +152,7 @@ window.loadStylesheet = (stylesheetPath) ->
|
||||
|
||||
window.loadLessStylesheet = (lessStylesheetPath) ->
|
||||
unless lessCache?
|
||||
LessCompileCache = require 'less-compile-cache'
|
||||
LessCompileCache = require './less-compile-cache'
|
||||
lessCache = new LessCompileCache()
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user