Example:
export class NamePlugin extends KLLPlugin {
constructor(kllInstance) {
super(kllInstance)
this.name = 'name'
}
action() {
//Do something
}
}
//main.js
import { KLL } from "@kll_/core"
import * as ctrlPath from "./ctrl"
import * as templatePath from "./templates"
//Import your plugin
// Define your routes and templates
const config = {
id: "app",
routes: {
'/': import('./pages/index.html?raw').then((m) => m.default),
},
ctrlPath, // Array of Controllers
templatePath, // Array of templates
plugins: [
NamePlugin
],
}
// Initialize KLL
const app = new KLL(config)