Getting started
Introduction
Overview of the ts-package-template project
The content in this page may have been generated by AI.
A future-proof TypeScript package template that includes everything you need to get started quickly with modern tooling. This template is designed to provide a solid foundation for building TypeScript packages with best practices and cutting-edge tools.
Features
- Modern TypeScript Setup: Configured with the latest TypeScript features and best practices
- Powerful Bundler: Uses Rolldown with tsdown for seamless TypeScript bundling
- Code Quality: Integrated with Biome for linting and formatting
- Testing: Comes with Vitest for fast unit testing
- Changelog Generation: Automatic changelog generation with git-cliff
- Easy Publishing: Simplified package publishing with np
- Git Hooks: Pre-configured Git hooks with lefthook
Philosophy
This template was created to provide developers with a starting point that:
- Uses modern, well-maintained tools
- Follows TypeScript best practices
- Includes everything needed for professional package development
- Is easy to understand and customize
- Follows conventional commits for better changelog generation
This template is opinionated but flexible. You can easily modify any configuration to suit your specific needs.
When to Use This Template
This template is ideal for:
- Creating new TypeScript packages/libraries
- Starting a new project with modern tooling
- Learning best practices for TypeScript package development
- Migrating existing projects to modern tooling
Tools Included
| Tool | Purpose | Documentation |
|---|---|---|
| TypeScript | Type checking and compilation | typescriptlang.org |
| Rolldown | JavaScript bundler | rolldown.rs |
| tsdown | TypeScript plugin for Rolldown | tsdown.dev |
| Biome | Code linter and formatter | biomejs.dev |
| Vitest | Unit testing framework | vitest.dev |
| git-cliff | Changelog generator | git-cliff.org |
| np | Package publishing | github.com/sindresorhus/np |
| pnpm | Package manager | pnpm.io |
| lefthook | Git hooks | github.com/evilmartians/lefthook |
| ultracite | Biome wrapper | github.com/biomejs/ultracite |