adding vendor/themes and themes to themeDirPaths

This commit is contained in:
Jon Rohan
2013-01-22 12:41:59 -08:00
parent 5969e79ebc
commit 379824f6b0
2 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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