Minimal TypeScript library starter powered by pnpm, tsdown, Vitest, oxlint, Biome, and release-please.
- Rename the project
- Update
package.jsonfields:name,description,repository.url,bugs.url, andhomepage. - Update
.github/workflows/release-please.ymlpackage-nameinput. - Change the heading of this README and any textual mentions of
tslib-template.
- Update
- Install dependencies
- Run
pnpm install(keeps Corepack downloads inside the repo)
- Run
- Verify tooling
- Run
pnpm check(runs type check, lint, snapshot update, and tests) andpnpm buildbefore committing. - Keep
tsdown.config.tsformatto JavaScript outputs (e.g.['esm', 'cjs']) and rely ondts: truefor declaration files.
- Run
- Configure CI/CD
- Add an
NPM_TOKENsecret to the GitHub repository for the publish workflow. - Ensure commits follow Conventional Commits so Release Please can generate changelog entries.
- Confirm the default branch is
mainto match workflow triggers.
- Add an
pnpm install– install dependenciespnpm build– produce ESM/CJS/d.ts bundles via tsdownpnpm dev– run tsdown in watch modepnpm test– run Vitestpnpm lint– run oxlintpnpm format– apply Biome formattingpnpm typecheck– run the TypeScript compiler without emitting filespnpm check– type check, lint, update snapshots, and test
- Push Conventional Commits to
main; Release Please opens or updates a release PR with the changelog and semver bump. - Merging that PR tags the release and triggers
.github/workflows/publish-on-tag.yml, which publishes to npm usingNODE_AUTH_TOKENderived from theNPM_TOKENsecret. - Publish provenance is enabled via
.npmrcandpublishConfig.provenance.
The CI workflow installs dependencies, lints, type-checks, runs Vitest in run mode, and builds the library on pushes and pull requests.