temp
This commit is contained in:
20
assistant/src/index.ts
Normal file
20
assistant/src/index.ts
Normal 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 };
|
||||
Reference in New Issue
Block a user