TypeScript project template with Nix, Bun workspaces, and semantic-release.
This is a monorepo workspace containing TypeScript packages managed with Bun workspaces, Nix for development environments, and semantic-release for automated versioning.
- @typescript-nix-template/docs: Astro Starlight documentation site
typescript-nix-template/
βββ packages/
β βββ docs/ # Astro Starlight documentation site
β βββ src/
β βββ public/
β βββ e2e/
β βββ tests/
β βββ package.json
βββ package.json # Workspace root configuration
βββ tsconfig.json # Shared TypeScript configuration
βββ flake.nix # Nix development environment
βββ justfile # Task runner commands
βββ CONTRIBUTING.md # Contribution guidelines
# Clone the repository
git clone https://github.com/sciexp/typescript-nix-template.git
cd typescript-nix-template
# Enter Nix development shell
nix develop
# Install dependencies
bun install
# Install all workspace dependencies
just install
# Clean all build artifacts
just clean
# Run command in specific package
just pkg docs <command>
# Run command in docs (shorthand)
just docs <command>
# Start dev server for docs
just dev
# Build docs
just build
# Run tests
just test
# Run unit tests
just test-unit
# Run E2E tests
just test-e2e
# Run command in specific package
bun run --filter '@typescript-nix-template/docs' dev
bun run --filter '@typescript-nix-template/docs' build
bun run --filter '@typescript-nix-template/docs' test
# Run command in all packages
bun run --filter '@typescript-nix-template/*' test
Comprehensive testing with Vitest and Playwright:
Command | Action |
---|---|
just test |
Run all tests in all packages |
just test-pkg <name> |
Run tests in specific package |
just test-unit |
Run unit tests in docs |
just test-e2e |
Run E2E tests in docs |
just test-watch |
Run Vitest in watch mode |
just test-ui |
Run Playwright in UI mode |
just test-coverage |
Generate test coverage report |
The docs package deploys to Cloudflare Workers:
# Preview locally
just cf-preview
# Deploy preview for branch
just cf-deploy-preview <branch>
# Deploy to production
just cf-deploy-production
This project uses semantic-release with conventional commits for automated versioning.
<type>(<scope>): <subject>
See CONTRIBUTING.md for detailed guidelines.
# Test release for specific package
just test-release docs
# Test release for all packages
just test-release-all
See CONTRIBUTING.md for contribution guidelines and conventional commit format.
MIT