This template is opinionated, and it is not meant to be a one-size-fits-all solution. It is meant to be a starting point for my personal projects to bootstrap development, as I like to create minimal viable products from time to time.
- ❌ TypeScript Application (use dorayx/template-typescript-app instead)
- ✅ TypeScript Library
- ❌ UI Component Library
- ✅ TypeScript v5
- ✅ Vite + Vitest
- ✅ Linters
- ✅ Code Generator
- ✅ Semantic Release
- ✅ GitHub Actions
- ❌ Monorepo
This template is configured with the following tools:
Compiler & Bundler
- TypeScript (v5)
- ts-patch: Patch typescript to allow custom transformers (plugins) during build
- typescript-transform-paths: Transform compiled source module resolution paths using TypeScript's paths config
Package Manager
- Yarn (v3)
- Doc: Zero-installs
Testing
- Vite (v4)
- Plugin: vite-tsconfig-paths
- Vitest
- Convention: Unit tests for user cases are stored in the
tests/units
directory - Convention: Unit tests for individual functions are placed in
*.test.ts
files alongside their respective source files - Convention: The file
tests/setup.ts
is executed before each test file - Convention: The
tests/tsconfig.json
file configures TypeScript for testing
- Convention: Unit tests for user cases are stored in the
- GitHub Action:
.github/workflows/test.yml
Linters
Code Generator
- Plop: A micro-generator framework that makes it easy for an entire team to create files with a level of uniformity
Publish
- semantic-release: Fully automated version management and package publishing
- GitHub Action:
.github/workflows/release-package.yml
- Env Variables:
NPM_TOKEN
is required to publish a package to the npm registry - Additional Plugin: semantic-release-yarn
- Additional Plugin: @semantic-release/changelog
- GitHub Action:
main
: Used for stable features & production releasesdev
: Used for features under developmentnext
: Used for experimental features