mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Load deserializers from files specified in package.json
This commit is contained in:
@@ -84,6 +84,7 @@ class Package
|
||||
@loadKeymaps()
|
||||
@loadMenus()
|
||||
@loadStylesheets()
|
||||
@loadDeserializers()
|
||||
@settingsPromise = @loadSettings()
|
||||
@requireMainModule() unless @mainModule? or @activationShouldBeDeferred()
|
||||
catch error
|
||||
@@ -253,6 +254,12 @@ class Package
|
||||
@stylesheets = @getStylesheetPaths().map (stylesheetPath) =>
|
||||
[stylesheetPath, @themeManager.loadStylesheet(stylesheetPath, true)]
|
||||
|
||||
loadDeserializers: ->
|
||||
for name, implementationPath of @metadata['atom-deserializers']
|
||||
deserialize = require(path.join(@path, implementationPath))
|
||||
atom.deserializers.add({name, deserialize})
|
||||
return
|
||||
|
||||
getStylesheetsPath: ->
|
||||
path.join(@path, 'styles')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user