Hemera-plugin package
hemera-plugin
is a plugin helper for Hemera.
Usage
hemera-plugin
can do some things for you:
- Check the bare-minimum version of Hemera
- Provide consistent interface to register plugins even when the api is changed
- Pass metadata to intialize your plugin with correct dependencies, default options and name.
const hp = moduleexports =
If you need to set a bare-minimum version of Hemera for your plugin, just add the semver range that you need:
const hp = moduleexports =
You can check here how to define a semver
range.
Async / Await
const hp = moduleexports =
You can also pass some metadata that will be handled by Hemera, such as the dependencies, default options and the name of your plugin.
const hp = { // your plugin code } moduleexports =