A minimal TypeScript library template powered by tsdown.
Build TypeScript libraries with dual ESM/CJS output, typed declarations, and a ready-to-use quality toolchain.
English | 简体中文
- Node.js
>=18 - pnpm
10
pnpm iinstalls dependenciespnpm buildcreates a local development build with sourcemapspnpm build:publishcreates a minified publish build without sourcemapspnpm test:runruns the Vitest suite oncepnpm checkruns lint, format check, typecheck, and tests
- Create a new repository from this template.
- Update
package.jsonmetadata for your package. - Run
pnpm i. - Use
pnpm buildduring development. - Verify changes with
pnpm check.
prepublishOnly runs pnpm build:publish automatically before publish.
The package publishes files from dist/ only and exposes both ESM and CJS entry points.