-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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.
- BuildConfig
- CommandLineOptions
- LinkOptions
- Options
- PackageConfig
- PackageInfo
- PackageManager
- PhaseParams
- Plugin
- PluginConfig
- PluginContext
- PluginDescriptor
- Project
- TargetConfig
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
}
}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