Constructor
new Plugin(pkgName, app)
Name | Type | Description |
---|---|---|
pkgName | string | Package name (the one you use in package.json) |
app | Object | App instance reference. Usefull to call app method inside a plugin |
- Source
Members
(static, constant) 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) exit()
Upon app termination, this method will be called first. Mostly useful for system cleanup, delete temporary files, freeing resources etc.
- Source
(async) init()
After config is read, plugin will be initialized. You can still change your config here, because after plugin is initialized, config will be deep frozen.
- Source
(async) loadConfig()
Load config from file in data directory, program arguments and environment variables. Level of importance: Env Variables > Program Arguments > Config File
- Source
(async) start()
This method will be called after plugin's init
- Source