Add an enableTheme() function to ThemeManager

And use it in the activatePackage() function in PackageManager
This commit is contained in:
Ben Ogle
2013-10-17 15:15:57 -07:00
parent b416116e0c
commit 077cb9ddb7
3 changed files with 19 additions and 4 deletions

View File

@@ -171,6 +171,11 @@ class ThemeManager
catch error
console.warn("Failed to load theme #{name}", error.stack ? error)
# Public:
enableTheme: (name) ->
themes = config.get('core.themes')
config.set('core.themes', _.uniq(themes.concat([name])))
# Public:
getUserStylesheetPath: ->
stylesheetPath = fsUtils.resolve(path.join(config.configDirPath, 'user'), ['css', 'less'])