mirror of
https://github.com/atom/atom.git
synced 2026-02-07 13:14:55 -05:00
Bundle a themes directory so we don't depend on ~/.atom/themes
We'll look first in the user themes directory, then in the built-in themes directory. This allows us to default to 'IR_Black' and not crash if the user doesn't setup their `~/.atom/themes` directory.
This commit is contained in:
@@ -16,8 +16,8 @@ class Theme
|
||||
if fs.exists(name)
|
||||
path = name
|
||||
else
|
||||
regex = new RegExp("#{_.escapeRegExp(name)}(\.[^.]*)?$", "i")
|
||||
path = _.find fs.list(config.themeDirPath), (path) -> regex.test(path)
|
||||
path = fs.resolve(config.themeDirPaths..., name)
|
||||
path ?= fs.resolve(config.themeDirPaths..., name + ".tmTheme")
|
||||
|
||||
if @isTextMateTheme(path)
|
||||
theme = @loadTextMateTheme(path)
|
||||
|
||||
Reference in New Issue
Block a user