Programmatic TypeScript Compiler
JSON →`tsc-prog` is a JavaScript/TypeScript library designed to programmatically build TypeScript projects. It offers a flexible API for invoking the TypeScript compiler (`tsc`) with granular control over the build process, going beyond simple CLI execution. This library is particularly suited for complex production build pipelines where custom logic, pre-build steps, or post-build steps are required. Key features include a simplified `build` function, direct access to TypeScript's `Program` creation and `emit` steps, and powerful addons. These addons address common TypeScript build pain points like cleaning output directories (`clean` option), copying non-TypeScript assets to the output directory (`copyOtherToOutDir`), and bundling type definitions into a single `.d.ts` file (`bundleDeclaration`). As of version 2.3.0, `tsc-prog` primarily operates as a CommonJS module and requires `typescript@>=4` as a peer dependency. While it doesn't specify a strict release cadence, updates appear as needed to support new TypeScript features or address build complexities.
Traffic · last 30 days ↓33% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany