mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
adding vendor/themes and themes to themeDirPaths
This commit is contained in:
@@ -10,7 +10,9 @@ configDirPath = fs.absolute("~/.atom")
|
||||
configJsonPath = fs.join(configDirPath, "config.json")
|
||||
userInitScriptPath = fs.join(configDirPath, "atom.coffee")
|
||||
bundledPackagesDirPath = fs.join(resourcePath, "src/packages")
|
||||
bundledVendorPackagesDirPath = fs.join(resourcePath, "vendor/packages")
|
||||
bundledThemesDirPath = fs.join(resourcePath, "themes")
|
||||
vendoredPackagesDirPath = fs.join(resourcePath, "vendor/packages")
|
||||
vendoredThemesDirPath = fs.join(resourcePath, "vendor/themes")
|
||||
userThemesDirPath = fs.join(configDirPath, "themes")
|
||||
userPackagesDirPath = fs.join(configDirPath, "packages")
|
||||
|
||||
@@ -19,8 +21,8 @@ require.paths.unshift userPackagesDirPath
|
||||
module.exports =
|
||||
class Config
|
||||
configDirPath: configDirPath
|
||||
themeDirPaths: [userThemesDirPath]
|
||||
packageDirPaths: [userPackagesDirPath, bundledVendorPackagesDirPath, bundledPackagesDirPath]
|
||||
themeDirPaths: [userThemesDirPath, bundledThemesDirPath, vendoredThemesDirPath]
|
||||
packageDirPaths: [userPackagesDirPath, bundledPackagesDirPath, vendoredPackagesDirPath]
|
||||
defaultSettings: null
|
||||
settings: null
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@ class Theme
|
||||
if fs.exists(name)
|
||||
path = name
|
||||
else
|
||||
path = fs.resolve(config.themeDirPaths..., name)
|
||||
path ?= fs.resolve(config.themeDirPaths..., name + ".tmTheme")
|
||||
path = fs.resolve(config.themeDirPaths..., name, ['', '.tmTheme'])
|
||||
|
||||
throw new Error("No theme exists named '#{name}'") unless path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user