From cb758e97293df1c226052f52ccecc7719f7746c5 Mon Sep 17 00:00:00 2001 From: Masahiko Sakakibara Date: Sat, 25 Dec 2021 15:33:57 +0900 Subject: [PATCH] fix(): import method from colorette --- src/cli.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index a992c4a..79e8494 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,5 +1,5 @@ import minimist from 'minimist'; -import c from 'colorette'; +import { green, red } from 'colorette'; import path from 'path'; import type { DocsGenerateOptions } from './types'; import { generate } from './generate'; @@ -60,7 +60,7 @@ export async function run(config: { cwd: string; args: string[] }) { } } catch (e) { if (!args.silent) { - console.error(c.red(`\n${emoji(`❌`)}DocGen ${e}\n`)); + console.error(red(`\n${emoji(`❌`)}DocGen ${e}\n`)); } process.exit(1); } @@ -75,7 +75,7 @@ function getTsconfigPath(cwd: string, cliTsConfigPath: string) { function logOutput(outputPath: string | undefined) { if (outputPath) { - console.log(c.green(`${emoji(`✔️`)}DocGen Output:`), outputPath); + console.log(green(`${emoji(`✔️`)}DocGen Output:`), outputPath); } }