Skip to content

Commit

Permalink
fix: command import
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Jun 25, 2021
1 parent ab3fddc commit a98453b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ main().catch((e: Error) => {
})

async function main(): Promise<void> {
// eslint-disable-next-line
const command = (
process.argv[2] === 'report'
? require('./report')
Expand All @@ -32,7 +33,7 @@ async function main(): Promise<void> {
? require('./bench')
: // default command
require('./bench')
) as () => Promise<void>
).default as () => Promise<void>

await command()
}

0 comments on commit a98453b

Please sign in to comment.