https://github.com/liblaf/copier-typescript
Copier template for Bun-first TypeScript libraries with Biome, GitHub Actions CI, release automation, and npm OIDC publishing.
https://github.com/liblaf/copier-typescript
biome bun continuous-integration copier copier-template github-actions npm oidc release-automation typescript
Last synced: 2 months ago
JSON representation
Copier template for Bun-first TypeScript libraries with Biome, GitHub Actions CI, release automation, and npm OIDC publishing.
- Host: GitHub
- URL: https://github.com/liblaf/copier-typescript
- Owner: liblaf
- License: mit
- Created: 2024-12-19T07:27:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-10T21:56:52.000Z (2 months ago)
- Last Synced: 2026-04-10T23:25:03.105Z (2 months ago)
- Topics: biome, bun, continuous-integration, copier, copier-template, github-actions, npm, oidc, release-automation, typescript
- Language: Jinja
- Size: 195 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/copier-org/copier)
[](https://bun.sh)
[](https://biomejs.dev)
[](https://github.com/liblaf/copier-typescript/actions/workflows/release-pr.yaml)
[](https://github.com/liblaf/copier-typescript/actions/workflows/shared-mega-linter.yaml)
[Changelog](https://github.com/liblaf/copier-typescript/blob/main/CHANGELOG.md) ยท [Report Bug](https://github.com/liblaf/copier-typescript/issues) ยท [Request Feature](https://github.com/liblaf/copier-typescript/issues)

Copier template for TypeScript packages that layers on top of `gh:liblaf/copier-shared` and `gh:liblaf/copier-release`, generating a Bun-first library setup with Biome, GitHub Actions, and npm publishing via OIDC.
## โจ Features
- ๐งฑ **Composable template stack:** Designed to be applied after `gh:liblaf/copier-shared` and `gh:liblaf/copier-release`, reusing shared answers and release automation instead of rebuilding them from scratch.
- โก **Bun-first package workflow:** Generates `package.json` scripts for `build`, `lint`, `test`, and `type-check`, uses `bunup` for builds, and adds a `mise` enter hook that runs `bun install`.
- ๐งผ **Opinionated library defaults:** Ships `biome.jsonc` and `tsconfig.json` that extend `@liblaf/config`, marks the package as ESM, and publishes only `dist/` with npm provenance enabled.
- ๐งช **CI that matches real projects:** The generated `typescript-test.yaml` packs the package on pushes and pull requests, runs tests only when `*.test.ts` files exist, uploads coverage and test results to Codecov, and runs `tsc --noEmit`.
- ๐ **Release automation for npm:** Conventional commits feed the release PR flow from `copier-release`, while the generated `typescript-release.yaml` builds release artifacts, publishes to npm with OIDC, and uploads release assets.
- ๐ก๏ธ **Safer template application:** Skips overwriting existing `package.json`, `tsconfig.json`, `biome.jsonc`, `.gitignore`, and VS Code settings when those files are already present.
## ๐ฆ Installation
> [!IMPORTANT]
> This template is meant to layer on top of `gh:liblaf/copier-shared` and `gh:liblaf/copier-release`.
```bash
copier copy --trust gh:liblaf/copier-shared my-package
copier copy --trust gh:liblaf/copier-release my-package
copier copy --trust gh:liblaf/copier-typescript my-package
```
When prompted, `package_name` defaults to `@/`.
## ๐ Quick Start
```bash
cd my-package
bun install
bun run lint
bun run test
bun run type-check
bun run build
```
Generated projects are ESM-first with `"type": "module"`. If you use `mise`, entering the project also adds `node_modules/.bin` to `PATH` and runs `bun install` automatically.
## ๐ Release Flow
1. Write conventional commits on `main`.
2. `release-pr.yaml` computes the next version, updates `CHANGELOG.md`, and opens a release PR.
3. Merging that PR triggers `release-draft.yaml`, which tags the release and creates the GitHub release. If immutable releases are enabled, it creates a draft first.
4. Published releases trigger `typescript-release.yaml`, which packs the project, publishes to npm with OIDC and provenance, and uploads the built tarball as a release asset.
5. `release-publish.yaml` runs hourly and publishes drafts older than 6 hours when immutable releases are enabled.
> [!TIP]
> After scaffolding a new repository, use `setup-npm-trusted-publish` so the `npm` environment and trusted publisher are ready for OIDC-based publishing.
## โจ๏ธ Local Development
```bash
git clone https://github.com/liblaf/copier-typescript.git
cd copier-typescript
copier copy --trust gh:liblaf/copier-shared ../copier-typescript-sandbox
copier copy --trust gh:liblaf/copier-release ../copier-typescript-sandbox
copier copy --trust . ../copier-typescript-sandbox
```
Most day-to-day changes live in `copier.yaml` and `template/`. Recopying into a scratch repository is the quickest way to verify the generated package layout and workflows.
## ๐ค Contributing
Issues and pull requests are welcome, especially when they tighten the generated package surface, improve the release flow, or keep the Bun and Biome defaults sharp.
[](https://github.com/liblaf/copier-typescript/pulls)
[](https://github.com/liblaf/copier-typescript/graphs/contributors)
## ๐ More Copier Templates
- **[Shared](https://github.com/liblaf/copier-shared)** - Base repository hygiene, shared automation, MegaLinter, and recurring maintenance workflows.
- **[Release](https://github.com/liblaf/copier-release)** - Conventional-commit release PRs, changelog generation, draft releases, and scheduled publish automation.
- **[Python](https://github.com/liblaf/copier-python)** - A modern Python project template with `mise`, Ruff, pytest, docs, and GitHub Actions.
- **[Rust](https://github.com/liblaf/copier-rust)** - A Rust project template with cross-compilation, CI, and release automation.
---
#### ๐ License
Copyright ยฉ 2024 [liblaf](https://github.com/liblaf).
This project is [MIT](https://github.com/liblaf/copier-typescript/blob/main/LICENSE) licensed.