Skip to content

Commit

Permalink
refactor: enableExecuteTypeScript()
Browse files Browse the repository at this point in the history
  • Loading branch information
Kok Kek committed Jun 2, 2023
1 parent 56ac3d0 commit b7c0f80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/cli/enableExecuteTypeScript.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function enableExecuteTypeScript (): void {
// Require ts-mocha to read TypeScript files and run tests
require('ts-mocha') // eslint-disable-line
}
5 changes: 2 additions & 3 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
FIRST_ARGUMENT
} from './checkers'
import { init } from './init'
import { enableExecuteTypeScript } from './enableExecuteTypeScript'
import { showMainMenu } from './menus/showMainMenu'
import { showGiverMenu } from './menus/showGiverMenu'
import { showGiverActionsMenu } from './menus/showGiverActionsMenu'
Expand All @@ -28,9 +29,7 @@ async function main (): Promise<void> {
return
}

// Require ts-mocha to read TypeScript files and run tests
require('ts-mocha') // eslint-disable-line

enableExecuteTypeScript()
const config = readConfig()
createCommands(config)

Expand Down

0 comments on commit b7c0f80

Please sign in to comment.