This commit is contained in:
2025-04-25 02:14:24 +08:00
parent 6827945446
commit 9eb4d06939
38 changed files with 1941 additions and 42 deletions

20
assistant/src/index.ts Normal file
View File

@@ -0,0 +1,20 @@
import { program, runProgram } from '@/program.ts';
import './command/init/index.ts';
/**
* 通过命令行解析器解析参数
* args[0] 是执行的命令, example: node
* args[1] 是执行的脚本, example: index.ts
* @param argv
*/
export const runParser = async (argv: string[]) => {
// program.parse(process.argv);
// console.log('argv', argv);
try {
program.parse(argv);
} catch (error) {
console.error('执行错误:', error.message);
}
};
export { runProgram };