From 4602fed130ad6bf4f73318a40d1011d94eebb897 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 1 Jun 2020 19:58:15 +0000 Subject: [PATCH] fix(core): update --- cli.js | 3 ++- cli.ts.js | 3 ++- ts/index.ts | 9 +++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cli.js b/cli.js index 9ebd5d2..a89c9c5 100644 --- a/cli.js +++ b/cli.js @@ -1,3 +1,4 @@ #!/usr/bin/env node process.env.CLI_CALL = 'true'; -require('./dist/index'); +const cliTool = require('./dist_ts/index'); +cliTool.runCli(); diff --git a/cli.ts.js b/cli.ts.js index eafbbe1..f700436 100644 --- a/cli.ts.js +++ b/cli.ts.js @@ -1,4 +1,5 @@ #!/usr/bin/env node process.env.CLI_CALL = 'true'; require('@gitzone/tsrun'); -require('./ts/index'); +const cliTool = require('./ts/index'); +cliTool.runCli(); diff --git a/ts/index.ts b/ts/index.ts index 72b830a..fb081ef 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,9 +1,6 @@ import { TsTest } from './tstest.classes.tstest'; -const cliRun = async () => { - if (process.env.CLI_CALL) { - const tsTestInstance = new TsTest(process.cwd(), process.argv[2]); - await tsTestInstance.run(); - } +export const runCli = async () => { + const tsTestInstance = new TsTest(process.cwd(), process.argv[2]); + await tsTestInstance.run(); }; -cliRun();