tachybase_todo/packages/plugin-client/src/index.ts

26 lines
485 B
TypeScript
Raw Normal View History

2022-02-07 21:54:35 +08:00
import { Plugin } from '@nocobase/server';
export default class PluginClient extends Plugin {
async beforeLoad() {
const cmd = this.app.findCommand('install');
if (cmd) {
cmd.option('--import-demo');
cmd.option('--lang [lang]');
}
this.app.on('afterInstall', async (app, options) => {
const [opts] = options?.cliArgs || [{}];
if (opts?.importDemo) {
}
if (opts?.lang) {
}
});
}
async load() {
}
}