From 86c4f8fadb8bdde4dd13ce1bc71bfaf9117223d5 Mon Sep 17 00:00:00 2001 From: Tom Gao Date: Fri, 7 Jun 2024 08:31:10 +0800 Subject: [PATCH] fix(dev): cli options logs use logger.log --- packages/vscode-dev/src/cli.ts | 11 +++++++---- packages/vscode-dev/tsconfig.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/vscode-dev/src/cli.ts b/packages/vscode-dev/src/cli.ts index 2427d09..f6ffc10 100644 --- a/packages/vscode-dev/src/cli.ts +++ b/packages/vscode-dev/src/cli.ts @@ -37,11 +37,13 @@ cli .option('-w, --watch', 'Watch mode') .option('--verbose', 'Display verbose output') .action(async (cwd: string, options: CLIOptions) => { + logger.enableDebug(options.verbose); const cliOpts = Object.assign({ cwd }, options); - console.log('cli options:', cliOpts); + + logger.debug('cli options:', cliOpts); const config = await getConfig(cliOpts); - console.log('config file:', config); + logger.debug('config file:', config); const mergedOpts = Object.assign( { @@ -52,9 +54,10 @@ cli ) as CLIOptions; mergedOpts.cwd ||= process.cwd(); - console.log('merged options:', mergedOpts); - logger.enableDebug(options.verbose); + + logger.debug('merged options:', mergedOpts); + await generateCode(mergedOpts); }); diff --git a/packages/vscode-dev/tsconfig.json b/packages/vscode-dev/tsconfig.json index e358066..94cebb5 100644 --- a/packages/vscode-dev/tsconfig.json +++ b/packages/vscode-dev/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "@tomjs/tsconfig/node.json", - "include": ["src", "test", "*.ts"] + "include": ["src", "*.ts", "package.json"] }