From 6f6daf6db016ccd034f313adbc8a4c60416d0123 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 18 Sep 2013 09:11:31 -0700 Subject: [PATCH] Use relative paths for requires --- src/config.coffee | 4 ++-- src/window.coffee | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/config.coffee b/src/config.coffee index 5dae93605..ffcd24809 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -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') diff --git a/src/window.coffee b/src/window.coffee index c7a9cde6a..c1dcf8142 100644 --- a/src/window.coffee +++ b/src/window.coffee @@ -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