Minimal TypeScript library starter powered by pnpm, tsdown, Vitest, oxlint, Biome, and release-please.
- Rename the project
- Update
package.json
fields:name
,description
,repository.url
,bugs.url
, andhomepage
. - Update
.github/workflows/release-please.yml
package-name
input. - 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 build
before committing. - Keep
tsdown.config.ts
format
to JavaScript outputs (e.g.['esm', 'cjs']
) and rely ondts: true
for declaration files.
- Run
- Configure CI/CD
- Add an
NPM_TOKEN
secret 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
main
to 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_TOKEN
derived from theNPM_TOKEN
secret. - Publish provenance is enabled via
.npmrc
andpublishConfig.provenance
.
The CI
workflow installs dependencies, lints, type-checks, runs Vitest in run mode, and builds the library on pushes and pull requests.