Creating a Plugin
import { Plugin } from 'bluerain-os';
import HelloWorldComponent from './HelloWorldComponent';
class HelloWorldPlugin extends Plugin {
static pluginName = HelloWorldPlugin;
static slug = 'hello-world';
const hooks = {
'bluerain.routes':(routes, ctx) => {
routes.push({
path: '/hello-world',
component: HelloWorldComponent
})
});
}
const uses = {
hooks:['foo.bar']
}
initialize(config, ctx) {
}
}
export default HelloWorldPlugin;Last updated