mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Load themes after packages, since we depend on them
This commit is contained in:
@@ -66,8 +66,10 @@ window.atom =
|
||||
if packagePath = @resolvePackagePath(name)
|
||||
return pack if pack = @getLoadedPackage(name)
|
||||
pack = Package.load(packagePath, options)
|
||||
@loadedPackages[pack.name] = pack
|
||||
@themes.register(pack) if pack.metadata.theme?
|
||||
if pack.metadata.theme
|
||||
@themes.register(pack)
|
||||
else
|
||||
@loadedPackages[pack.name] = pack
|
||||
pack
|
||||
else
|
||||
throw new Error("Could not resolve '#{name}' to a package path")
|
||||
|
||||
@@ -38,7 +38,7 @@ class ThemeManager
|
||||
@trigger('reloaded')
|
||||
|
||||
activateTheme: (name) ->
|
||||
theme = _.find(@registeredTheme, (t) -> t.metadata.name == name)
|
||||
theme = _.find(@registeredThemes, (t) -> t.metadata.name == name)
|
||||
return console.warn("Theme '#{name}' not found.") unless theme
|
||||
|
||||
try
|
||||
|
||||
@@ -54,8 +54,8 @@ window.startEditorWindow = ->
|
||||
config.load()
|
||||
keymap.loadBundledKeymaps()
|
||||
atom.loadBaseStylesheets()
|
||||
atom.loadThemes()
|
||||
atom.loadPackages()
|
||||
atom.loadThemes()
|
||||
deserializeEditorWindow()
|
||||
atom.activatePackages()
|
||||
keymap.loadUserKeymaps()
|
||||
|
||||
Reference in New Issue
Block a user