Introduction

@jstility/tship

npm versionLicenseNode VersionDocumentationDonate

Banner Logo

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.json with conditional exports, main, module, types, and typesVersions for maximum ecosystem compatibility
  • Robust watch mode – uses chokidar for reliable file watching (falls back to tsc --watch when not configured)
  • Plugin system – hook into onPostEmit and onBuildEnd to extend the build pipeline
  • Zero config – runs as standard tsc by default; advanced features are activated only when you add tship settings
  • 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 build

Authors 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).

Learn more in the installation guide →