feat(cli): Add emitcheck command to validate TS file emission without generating output
This commit is contained in:
25
readme.md
25
readme.md
@ -121,6 +121,31 @@ compiling in this order:
|
||||
[ 'ts_interfaces', 'ts_shared', 'ts_core', 'ts_utils', 'ts_modules' ]
|
||||
```
|
||||
|
||||
### EmitCheck Command
|
||||
|
||||
Checks if TypeScript files can be emitted without actually emitting them:
|
||||
|
||||
```bash
|
||||
npx tsbuild emitcheck <file_or_glob_pattern> [additional_patterns ...]
|
||||
```
|
||||
|
||||
This command:
|
||||
1. Performs type checking on the specified TypeScript file(s)
|
||||
2. Supports both direct file paths and glob patterns
|
||||
3. Reports any errors that would prevent successful compilation
|
||||
4. Exits with code 0 if all files can be emitted, or 1 if any cannot
|
||||
5. Doesn't produce any output files
|
||||
|
||||
Example usage with specific files:
|
||||
```bash
|
||||
npx tsbuild emitcheck src/main.ts src/utils.ts
|
||||
```
|
||||
|
||||
Example usage with glob patterns:
|
||||
```bash
|
||||
npx tsbuild emitcheck "src/**/*.ts" "test/**/*.ts"
|
||||
```
|
||||
|
||||
## Compiler Options
|
||||
|
||||
Additional flags can be passed to any command to modify the compilation behavior:
|
||||
|
Reference in New Issue
Block a user