lackey-cms/configuration
- lackey-cms/configuration
- module.exports(site, stage) ⏏
- ~Configuration
- new Configuration(stage)
- .load() ⇒
Promise.<Config> - .isTest() ⇒
Boolean - .get(name) ⇒
mixed|null
- ~Configuration
- module.exports(site, stage) ⏏
module.exports(site, stage) ⏏
Setups module and overrides it
Kind: Exported function
| Param | Type |
|---|---|
| site | string |
| stage | string |
module.exports~Configuration
Manages configuration loading. Configuration is composed from layers, where every next can override previous. Order of loading is:
- CMS config for stage (or default, if stage doesn't exists)
- Stack config for stage (or default, if stage doesn't exists)
- Site config for stage (or default, if stage doesn't exists)
Kind: inner class of module.exports
- ~Configuration
- new Configuration(stage)
- .load() ⇒
Promise.<Config> - .isTest() ⇒
Boolean - .get(name) ⇒
mixed|null
new Configuration(stage)
| Param | Type | Description |
|---|---|---|
| stage | string |
staging environment |
configuration.load() ⇒ Promise.<Config>
Loads configuration
Kind: instance method of Configuration
configuration.isTest() ⇒ Boolean
Informs is application runs in test mode
Kind: instance method of Configuration
Returns: Boolean - is in test mode
configuration.get(name) ⇒ mixed | null
Gets field from configuration. Accept dot notation as defined in https://www.npmjs.com/package/object-path
Kind: instance method of Configuration
| Param | Type |
|---|---|
| name | string |
Generated with gulp-jsdoc-to-markdown and roadmarks. © Enigma Marketing Services 2016