Constructor
new Base(pkgName, app)
Constructor.
| Name | Type | Description |
|---|---|---|
pkgName | string | Package name (the one in package.json) |
app | Object | App instance reference. Useful to call app method inside a plugin |
- Source
Members
dependencies :Array.<string>
Dependencies to other plugins. Enter all plugin's package name your plugin dependent from.
Semver is also supported.
- Array.<string>
- Source
Methods
(async) dispose() → {Promise.<void>}
Dispose internal references.
- Source
- Type:
- Promise.<void>
(async) exit() → {void}
Upon app termination, this method will be called first. Mostly useful for system cleanup, delete temporary files, freeing resources etc.
- Source
- Type:
- void
(async) init() → {void}
After config is read, plugin will be initialized.
- Source
- Type:
- void
(async) loadConfig() → {void}
Load config from file in data directory, program arguments and environment variables. Level of importance: Env Variables > Program Arguments > Config File
- Source
- Type:
- void
(async) start() → {void}
This method will be called after plugin's init. You can still change your config here, because after plugin is started, config will be deep frozen
- Source
- Type:
- void
(async) stop() → {void}
Reserved for future use. This method will be called before plugin is stopped.
- Source
- Type:
- void