Skip to content

A simple and professional template for developing and maintaining TypeScript libraries with modern tools, automated releases, and best practices.

License

Notifications You must be signed in to change notification settings

fvena/typescript-library-template-pro

Repository files navigation


⭐   Star this template if you find it useful ↗️

TypeScript Library Template Pro Logo

TypeScript Library Template Pro

A modern, professional template for building robust TypeScript libraries with zero configuration.


GitHub package.json version Status Build Status License: MIT PRs Welcome

Why This Template?

Stop wasting days on boilerplate setup and focus on what matters - your library code:

  • Instant Setup: Start coding your library in less than 5 minutes
  • Developer Experience: Hot reloading, type checking and fast testing
  • Battle-tested Tools: Pre-configured ESLint, Prettier, Vitest, Husky, and more
  • Future-proof: ESM & CommonJS support, full TypeScript strictness
  • Automated Everything: From linting to releases to documentation
  • Playground: A playground for testing your library
Workflow Visualization

Key Features

  • TypeScript First: Full support for modern TypeScript with strict typing
  • Dual Package: Outputs both ESM and CommonJS formats
  • Optimized Build: Lightning-fast builds with Tsup
  • Code Quality: Pre-configured ESLint and Prettier
  • Testing Ready: Unit testing with Vitest
  • Git Hooks: Enforced commit standards with Commitlint and Husky
  • Documentation: Beautiful docs with Vitepress
  • CI/CD: GitHub Actions for testing, publishing and deploying
  • Semantic Release: Automated versioning and changelog generation

Quick Start in 3 Steps

1. Create Your Project

You can start using this template by clicking the green "Use this template" button on GitHub or by cloning the repository:

# Clone the repository
git clone https://github.com/fvena/typescript-library-template-pro.git your-library-name
cd your-library-name

# Install dependencies
npm install

2. Configure Your Project

Customize your project details before development:

  • Project Metadata: Update package.json (name, version, author, etc.)
  • License: Edit LICENSE with your details
  • Docs Configuration: Update docs/.vitepress/config.ts (set base to repo name)

Optional (Recommended for Publishing):

  • GitHub Secrets: Add GH_TOKEN and NPM_TOKEN for releases
  • Enable GitHub Pages: Set GitHub Actions as the source for GitHub Pages

3. Start Developing

npm run dev          # Development mode with auto-rebuild
npm run playground   # Start the playground
npm test             # Run tests
npm run doc:dev      # Preview documentation

Deployment & Publishing

The deployment process is fully automated with GitHub Actions.

  1. Use Conventional Commits (feat:, fix:, etc.)
  2. Push to main
  3. GitHub Actions will:
    • Run tests & linting
    • Update version & changelog
    • Publish to NPM (if configured)
    • Deploy docs (if enabled)

Complete Documentation

For detailed instructions on setup, customization, and advanced features, visit our 📘 documentation site.

Popular Sections

Need Help?

License

This template is MIT licensed - use it freely for personal and commercial projects.


Your ⭐ motivates continued development and maintenance

About

A simple and professional template for developing and maintaining TypeScript libraries with modern tools, automated releases, and best practices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published