Note
This is template repository for library development using TypeScript and Vite. Check out website template for web application development.
git clone https://github.com/templecon/template-typescript-vite
cd template-typescript-vite
pnpm installNode.js 26 or higher is required. The template runs TypeScript configuration and hooks directly with Node's built-in type stripping.
This project uses pnpm.
Every src/**/index.ts file is an ESM library entrypoint. The Vite configuration discovers these files automatically and emits matching JavaScript and declaration files under dist/.
| Source file | Package import |
|---|---|
src/index.ts |
your-package |
src/feature/index.ts |
your-package/feature |
This template is intentionally private so cloning it cannot accidentally publish the template itself. Before an initial public release, choose your package identity: set a unique name and release version, set private to false, and add the package's repository and publishConfig.access metadata.
The included Publish workflow uses npm Trusted Publishing with GitHub Actions OIDC. It has no npm token or registry secret. Configure the matching GitHub Actions trusted publisher in the package's npm settings after the package's initial registry release. The workflow runs automatically on every tag matching v*.*.* (for example v0.1.0) and publishes the package version referenced by that tag.
Project conventions are available from the conventions MCP server. The project agent guidance identifies the applicable TypeScript, schema, and Vitest conventions.