Skip to content
AI Monorepos Free online conference · June 23 Join us!

TypeScript Packages template

A monorepo of publishable TypeScript packages, release tooling included.

Terminal window
npx create-nx-workspace@latest my-workspace --template typescript
TypeScript Packages template preview

A package-based monorepo for publishing libraries to npm. TypeScript packages with project references, incremental builds, and Nx Release configured for versioning and changelogs - the foundation for a design system, SDK, or any multi-package library.

Highlights

Built to publish

Nx Release handles versioning, changelogs, and publishing across every package with one command.

Fast, incremental builds

TypeScript project references plus caching mean you only rebuild what changed.

Add packages in seconds

Generate a new publishable package with consistent config every time.

Quickstart

  • Add a new package:
    Terminal window
    npx nx g @nx/js:lib packages/my-lib --publishable
  • Build every package:
    Terminal window
    npx nx run-many -t build
  • Dry-run a release:
    Terminal window
    npx nx release --dry-run
  • Visualize your monorepo's graph in the browser:
    Terminal window
    npx nx graph

What's inside

  • packages/* - TypeScript libraries, most ready to publish
  • Nx Release configured for versioning + changelogs
  • Vitest for unit testing

Speed up CI with Nx Cloud

Connect this monorepo to Nx Cloud to share one remote cache across your team and CI, and distribute tasks across machines as it grows.

  • Remote caching shared across your team and CI
  • Distributed task execution with Nx Agents
  • Automated e2e test splitting
  • CI that detects failures and proposes fixes

Learn more