TPT

ts-package-template

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

ToolPurposeDocumentation
TypeScriptType checking and compilationtypescriptlang.org
RolldownJavaScript bundlerrolldown.rs
tsdownTypeScript plugin for Rolldowntsdown.dev
BiomeCode linter and formatterbiomejs.dev
VitestUnit testing frameworkvitest.dev
git-cliffChangelog generatorgit-cliff.org
npPackage publishinggithub.com/sindresorhus/np
pnpmPackage managerpnpm.io
lefthookGit hooksgithub.com/evilmartians/lefthook
ultraciteBiome wrappergithub.com/biomejs/ultracite

On this page