Remove remaining package paths from Config class

This commit is contained in:
Kevin Sawicki
2013-10-14 18:42:11 -07:00
parent ad0d0473b3
commit d4b5303983
4 changed files with 3 additions and 11 deletions

View File

@@ -62,7 +62,7 @@ class Atom
@packages = new PackageManager({devMode, configDirPath, resourcePath})
@subscribe @packages, 'activated', => @watchThemes()
@themes = new ThemeManager({packageManager: @packages, resourcePath})
@themes = new ThemeManager({packageManager: @packages, configDirPath, resourcePath})
@contextMenu = new ContextMenuManager(devMode)
@menu = new MenuManager({resourcePath})
@pasteboard = new Pasteboard()

View File

@@ -33,13 +33,6 @@ class Config
# Private: Created during initialization, available as `global.config`
constructor: ({@configDirPath, @resourcePath}={}) ->
@nodeModulesDirPath = path.join(@resourcePath, "node_modules")
@bundledPackageDirPaths = [@nodeModulesDirPath]
@packageDirPaths = [path.join(@configDirPath, "packages")]
if atom.getLoadSettings().devMode
@packageDirPaths.unshift(path.join(@configDirPath, "dev", "packages"))
@userPackageDirPaths = _.clone(@packageDirPaths)
@defaultSettings = {}
@settings = {}
@configFilePath = fs.resolve(@configDirPath, 'config', ['json', 'cson'])

View File

@@ -17,7 +17,7 @@ module.exports =
class ThemeManager
Emitter.includeInto(this)
constructor: ({@packageManager, @resourcePath}) ->
constructor: ({@packageManager, @resourcePath, @configDirPath}) ->
@lessCache = null
@packageManager.registerPackageActivator(this, ['theme'])
@@ -87,7 +87,7 @@ class ThemeManager
# Public:
getUserStylesheetPath: ->
stylesheetPath = fs.resolve(path.join(atom.config.configDirPath, 'user'), ['css', 'less'])
stylesheetPath = fs.resolve(path.join(@configDirPath, 'user'), ['css', 'less'])
if fs.isFileSync(stylesheetPath)
stylesheetPath
else