mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Support schemas in packages
This commit is contained in:
@@ -143,7 +143,10 @@ class Package
|
||||
|
||||
@requireMainModule()
|
||||
if @mainModule?
|
||||
atom.config.setDefaults(@name, @mainModule.configDefaults)
|
||||
if @mainModule.config? and typeof @mainModule.config is 'object'
|
||||
atom.config.setSchema @name, {type: 'object', properties: @mainModule.config}
|
||||
else if @mainModule.configDefaults? and typeof @mainModule.configDefaults is 'object'
|
||||
atom.config.setDefaults(@name, @mainModule.configDefaults)
|
||||
@mainModule.activateConfig?()
|
||||
@configActivated = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user