From a98453b14fad0f8cd2125efe8282e4d829ad48c3 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Fri, 25 Jun 2021 17:56:23 -0400 Subject: [PATCH] fix: command import --- package.json | 1 + src/cli/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 52e8dde..3c60ebb 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "main": "./dist-cjs/index.js", "module": "./dist-esm/index.js", "scripts": { + "bema": "ts-node src/cli", "format": "yarn format:prettier && yarn format:imports", "format:prettier": "prettier --write .", "format:imports": "format-imports src && format-imports tests", diff --git a/src/cli/index.ts b/src/cli/index.ts index 8f646d7..da3e68c 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -23,6 +23,7 @@ main().catch((e: Error) => { }) async function main(): Promise { + // eslint-disable-next-line const command = ( process.argv[2] === 'report' ? require('./report') @@ -32,7 +33,7 @@ async function main(): Promise { ? require('./bench') : // default command require('./bench') - ) as () => Promise + ).default as () => Promise await command() }