25 lines
701 B
TypeScript
25 lines
701 B
TypeScript
import * as plugins from './plugins.js';
|
|
import { runCustomBundles } from './mod_custom/index.js';
|
|
import { runInit } from './mod_init/index.js';
|
|
|
|
export const runCli = async () => {
|
|
const tsBundleCli = new plugins.smartcli.Smartcli();
|
|
|
|
// Default command: run custom bundles from npmextra.json
|
|
tsBundleCli.standardCommand().subscribe(async (argvArg) => {
|
|
await runCustomBundles();
|
|
});
|
|
|
|
// Explicit custom command (same as default)
|
|
tsBundleCli.addCommand('custom').subscribe(async (argvArg) => {
|
|
await runCustomBundles();
|
|
});
|
|
|
|
// Interactive init wizard
|
|
tsBundleCli.addCommand('init').subscribe(async (argvArg) => {
|
|
await runInit();
|
|
});
|
|
|
|
tsBundleCli.startParse();
|
|
};
|