fix(cli): Improve TS folder compilation order display in CLI
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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.' | ||||
| } | ||||
|   | ||||
| @@ -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}`; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user