Skip to content

Commit

Permalink
fix(dev): cli options logs use logger.log
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgao365 committed Jun 7, 2024
1 parent 88000e2 commit 86c4f8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions packages/vscode-dev/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand All @@ -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);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-dev/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "@tomjs/tsconfig/node.json",
"include": ["src", "test", "*.ts"]
"include": ["src", "*.ts", "package.json"]
}

0 comments on commit 86c4f8f

Please sign in to comment.