diff --git a/changelog.md b/changelog.md index 3016e28..3b3a391 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-05-15 - 2.4.1 - fix(cli) +Improve TS folder compilation order display in CLI + +- Refactor folder compilation output to use a bordered, tabular format with order numbering +- Enhance readability of TS folder compilation plan in the CLI output + ## 2025-05-15 - 2.4.0 - feat(cli) Add new 'check' command for type checking and update compiler options handling diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 88ce384..c0af56e 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tsbuild', - version: '2.4.0', + version: '2.4.1', description: 'A tool for compiling TypeScript files using the latest nightly features, offering flexible APIs and a CLI for streamlined development.' } diff --git a/ts/tsbuild.cli.ts b/ts/tsbuild.cli.ts index 8a0dff9..90ec9dc 100644 --- a/ts/tsbuild.cli.ts +++ b/ts/tsbuild.cli.ts @@ -164,8 +164,20 @@ export const runCli = async () => { const compilationCommandObject: { [key: string]: string } = {}; - console.log(`\nšŸ”„ Compiling TS folders in this order:`); - console.log(' ' + sortedTsFolders.join('\n ') + '\n'); + const folderCount = sortedTsFolders.length; + console.log(`\nšŸ“‚ TypeScript Folder Compilation Plan (${folderCount} folder${folderCount !== 1 ? 's' : ''})`); + console.log('ā”Œ' + '─'.repeat(60) + '┐'); + console.log('│ šŸ”„ Compilation Order │'); + console.log('ā”œ' + '─'.repeat(60) + '┤'); + + sortedTsFolders.forEach((folder, index) => { + const prefix = index === folderCount - 1 ? '└─' : 'ā”œā”€'; + const position = `${index + 1}/${folderCount}`; + console.log(`│ ${prefix} ${position.padStart(5)} ${folder.padEnd(46)} │`); + }); + + console.log('ā””' + '─'.repeat(60) + 'ā”˜\n'); + for (const tsFolder of sortedTsFolders) { compilationCommandObject[`./${tsFolder}/**/*.ts`] = `./dist_${tsFolder}`; }