Naming conventions
We require a few conventions to standardize things and to avoid conflicts. These are as follows:
- Plugin Name: Let's consider a plugin named Auth that provides authentication.
- Class Name: The name of the class will be your plugin name suffixed with 'Plugin', i.e., AuthPlugin.
- getPluginName: When returning the name of the plugin, we add
<plugin_name>
with @, followed by the version. ex: Auth@1.0.0 (<plugin_name>@
). - Adding functions: While functions can be added to pluginStore with any name, we recommend the format
<plugin_name>.<function_name>
to ensure uniqueness across plugins. Ex: Auth.authenticate. - Events: Events can be added and dispatched from pluginStore using any name. To show which event belongs to which plugin, we recommend the format
<plugin_name>.<event_name>
Ex: Auth.checking.