TSDX

2.0.0 · active · verified Sun Apr 19

TSDX is a zero-configuration command-line interface (CLI) for modern TypeScript package development, currently stable at version 2.0.0. It aims to simplify the creation, testing, and publication of TypeScript libraries by abstracting away complex build configurations. Version 2.0.0 represents a complete rewrite, transitioning to high-performance Rust-based tooling, including bunchee for bundling, Vitest for testing, OXLint for linting, and OXFmt for formatting. While it doesn't adhere to a fixed release cadence, major updates like v2.0.0 introduce significant architectural shifts and toolchain changes. Its key differentiators include the 'zero-config' philosophy, the integration of lightning-fast Rust tools for improved developer experience, built-in support for dual ESM/CommonJS outputs, and robust TypeScript declaration generation.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates how to create a new TSDX project, install its dependencies using Bun, and start the development server for real-time compilation and testing.

# Create a new package interactively
bunx tsdx create mylib

# Navigate to the project
cd mylib

# Install dependencies and start development server
bun install
bun run dev

// In src/index.ts (example content):
export const sum = (a: number, b: number): number => a + b;
export const multiply = (a: number, b: number): number => a * b;

console.log(sum(1, 2)); // Should output 3

view raw JSON →