starter-lib-ts

TypeScript library starter template, supports ESM and CJS. / TypeScript 库初始化模板,支持 ESM 和 CJS。

MIT License

Downloads
136
Stars
0
Committers
1

TypeScript Library Starter Template

TypeScript library starter template, supports ESM and CJS.

Features

  • Build package with tsup - Bundle your TypeScript library with no config.
  • Unit Testing with Vitest.
  • Publish to npm with zero-config.

Usage

Create a repo from this template on GitHub.

git clone <git remote url>

Install npm dependencies.

cd starter-lib-ts # Or your project directory

pnpm i # If you don't have pnpm installed, run: npm install -g pnpm

Just run dev script to build your files.

pnpm dev

To build the library, you can run:

pnpm build

If you want to publish it, you can run:

pnpm release

Clean Template

If you prefer to do it manually with the cleaner git history:

npx degit templates-collective/starter-lib-ts starter-lib-ts

cd starter-lib-ts

pnpm i # If you don't have pnpm installed, run: npm install -g pnpm

When you use this template, try follow the checklist to update your info properly:

  • Change the author name in LICENSE.
  • Change the package name in package.json.

License

MIT License © 2024 Kieran Wang

Package Rankings
Top 31.63% on Npmjs.org
Badges
Extracted from project README's
Version
Related Projects