UNPKG

@sodacore/ui

Version:

Sodacore UI is a powerful JSON-based DSL for describing web pages that can be rendered by a frontend JavaScript framework.

22 lines (21 loc) 734 B
import { BasePlugin, Utils } from '@sodacore/core'; import { file } from 'bun'; const packageJson = file(Utils.resolve(import.meta.dirname, '../../package.json')); if (!await packageJson.exists()) throw new Error('Package.json not found.'); const packageMeta = await packageJson.json(); export default class UiPlugin extends BasePlugin { constructor(config = {}) { super(config); this.config = config; this.name = packageMeta.name; this.version = packageMeta.version; this.description = packageMeta.description; this.author = packageMeta.author; this.setup(); } async install(app) { console.log(typeof app); // app.register({}); // @todo } }