feat(cli): Add CLI support with command parsing and version display
This commit is contained in:
21
ts/cli.ts
Normal file
21
ts/cli.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import * as paths from './paths.js';
|
||||
|
||||
export const run = async () => {
|
||||
const tspmProjectinfo = new plugins.projectinfo.ProjectInfo(paths.packageDir);
|
||||
|
||||
const smartcliInstance = new plugins.smartcli.Smartcli();
|
||||
smartcliInstance.addVersion(tspmProjectinfo.npm.version);
|
||||
|
||||
smartcliInstance.standardCommand().subscribe({
|
||||
next: (argvArg) => {
|
||||
console.log(`Please specify a command.`)
|
||||
},
|
||||
});
|
||||
|
||||
smartcliInstance.addCommand('restart').subscribe({
|
||||
|
||||
})
|
||||
|
||||
smartcliInstance.startParse();
|
||||
}
|
Reference in New Issue
Block a user