@jstility/tship
✨ A smarter build tool that starts like tsc and grows with you. Enable dual-format output, automatic package.json exports, and a robust watch mode with just a few lines of configuration. ✨
Features
TShip is built on top of the TypeScript compiler API and delivers:
- Dual-format output – produce CommonJS and ES modules from a single codebase (opt-in)
- Smart extension handling – automatically renames files when output directories collide, keeps standard extensions otherwise
- Auto-exports – updates
package.jsonwith conditionalexports,main,module,types, andtypesVersionsfor maximum ecosystem compatibility - Robust watch mode – uses chokidar for reliable file watching (falls back to
tsc --watchwhen not configured) - Plugin system – hook into
onPostEmitandonBuildEndto extend the build pipeline - Zero config – runs as standard
tscby default; advanced features are activated only when you addtshipsettings - Fast – compiles each format in parallel using the TypeScript API
All features are configurable via tsconfig.json, a dedicated tship.config.ts, or CLI flags.
Quick Start
npm install -D @jstility/tship typescript
npx tship init
npx tship buildAuthors and Acknowledgment
@jstility/tship was created by Rangga Fajar Oktariansyah (@FajarKim (opens in a new tab)) and is maintained by the JStility (@jstility (opens in a new tab)) organization.
It builds upon the excellent TypeScript compiler API (opens in a new tab) and is inspired by tools like tsup and tsc.
License
This project is licensed under the Apache License 2.0 (opens in a new tab).