diff --git a/ts/index.ts b/ts/index.ts index c5d4b18..1b0e8e5 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,2 +1,3 @@ import plugins = require('./tools.plugins'); import * as cli from './tools.cli'; +cli.run(); diff --git a/ts/tools.cli.ts b/ts/tools.cli.ts index 20a96ed..d0ca02c 100644 --- a/ts/tools.cli.ts +++ b/ts/tools.cli.ts @@ -1,11 +1,13 @@ import * as plugins from './tools.plugins'; import * as toolsInstall from './tools.install'; -const toolsCli = new plugins.smartcli.Smartcli(); +export const run = async () => { + const toolsCli = new plugins.smartcli.Smartcli(); -toolsCli.addCommand('install').subscribe(async argvArg => { - toolsInstall.install('default'); -}); + toolsCli.addCommand('install').subscribe(async argvArg => { + toolsInstall.install('default'); + }); -toolsCli.addVersion('no version set'); -toolsCli.startParse(); + toolsCli.addVersion('no version set'); + toolsCli.startParse(); +};