From d0c6ebb0dfe105499d8641e7a076a2e322d3e6c4 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 19 Jun 2019 14:24:08 +0200 Subject: [PATCH] fix(core): update --- ts/index.ts | 1 + ts/tools.cli.ts | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) 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(); +};