From 64a4ebeb16cf32f846f1b2f1c94688e312e01120 Mon Sep 17 00:00:00 2001 From: Xmader Date: Tue, 24 Nov 2020 17:43:07 -0500 Subject: [PATCH] refactor: commonjs require --- src/cli.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 93fcec3..2b42736 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,8 +1,7 @@ + +/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable no-void */ -import inquirer from 'inquirer' -import ora from 'ora' -import chalk from 'chalk' import fs from 'fs' import { fetchMscz } from './mscz' import { loadMscore, INDV_DOWNLOADS, WebMscore } from './mscore' @@ -10,6 +9,10 @@ import { ScoreInfoHtml } from './scoreinfo' import { escapeFilename } from './utils' import i18n from './i18n' +const inquirer: typeof import('inquirer') = require('inquirer') +const ora: typeof import('ora') = require('ora') +const chalk: typeof import('chalk') = require('chalk') + const SCORE_URL_PREFIX = 'https://musescore.com/' void (async () => {