Skip to content
alanlohse edited this page Aug 8, 2021 · 3 revisions

Welcome to the GottaBe Plugin Development API wiki! Here you can find resources for plugin development.

API Docs

Namespaces

Enumerations

Interfaces

Creating a plugin

Creating a GottaBe plugin is an easy task. You just have to create a class implementing the interface Plugin and export it. See the example bellow:

import { PhaseParams, Plugin, PluginContext } from 'gottabe-plugin-dev';
export class MyPlugin implements Plugin {
    async process(phaseParams: PhaseParams, pluginContext: PluginContext): Promise<void> {
        // do something
    }
}

Building the plugin

Plugins must be constructed in such a way that they include any dependencies used on them. A commonly used package for bundling dependencies is browserify. Thus, if the plugin was typescripted and browserify is being used to generate the bundle, the scripts below can be executed:

  tsc && browserify ./dist/index.js --node --standalone plugin -o ./dist/index.bundle.js

Publishing your plugin

Clone this wiki locally