mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Remove remaining package paths from Config class
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user