18 lines
340 B
TypeScript
18 lines
340 B
TypeScript
import { exec } from '@kernel:base';
|
|
|
|
// export default {
|
|
// config: {
|
|
|
|
// }
|
|
// }
|
|
|
|
export function boot() {
|
|
for(const [name, script] of Object.entries(this.config)) {
|
|
exec(script as string);
|
|
}
|
|
}
|
|
|
|
export function add(name: string, ...commandParts: string[]) {
|
|
this.config ??= {};
|
|
this.config[name] = commandParts.join(' ');
|
|
} |