Skip to content

beogip/bun-ts-template

Repository files navigation

bun-ts-template

CI

Minimal TypeScript starter for Bun. Includes Biome for linting/formatting, Lefthook for git hooks, and semantic-release for automated versioning.

Getting Started

Prerequisites: Bun >= 1.0

# Use this template on GitHub, then:
git clone https://github.com/<your-username>/<your-repo>
cd <your-repo>
bun install

Development

Command Description
bun run dev Run with file watcher
bun run build Compile to dist/
bun test Run tests
bun run check Lint + format (Biome, auto-fix)
bun run lint Lint only
bun run format Format only

Project Structure

src/          # Source code
tests/        # Test files (*.test.ts)
dist/         # Build output (git-ignored)

Git Hooks

Lefthook runs automatically after bun install (via the prepare script):

  • pre-commit — Biome checks and auto-fixes staged files
  • commit-msg — Validates Conventional Commits format

Releases

Releases are automated via semantic-release on every push to main:

  • feat: → minor release
  • fix: → patch release
  • feat!: or BREAKING CHANGE: → major release

The CI workflow handles changelog generation, GitHub releases, and version bumping automatically.

About

Minimal TypeScript starter template for Bun. Includes Biome, Lefthook, and semantic-release.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors