starter-lib-ts
v1.3.0
Published
TypeScript library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.
Readme
TypeScript Library Starter Template
TypeScript library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.
Features
- Build package with tsup - Bundle your TypeScript library with no config.
- Out-of-the-box unit testing with Vitest.
- VitePress documentation - Deploy on Netlify with zero-config, supports other deployment methods as well.
- Manage versions using the bumpp, and publish to npm with zero-configPublish 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 pnpmJust run dev script to build your files.
pnpm devOpen documentation for the library, you can run:
pnpm docs:devTo build the library, you can run:
pnpm buildIf you want to publish it, you can run:
pnpm releaseClean Template
If you prefer to do it manually with the cleaner git history:
npx degit starter-collective/starter-lib-ts starter-lib-ts
cd starter-lib-ts
pnpm i # If you don't have pnpm installed, run: npm install -g pnpmWhen you use this template, try follow the checklist to update your info properly:
- [ ] Change the package name in
package.jsonand the globaliifevariable intsup.config.ts. - [ ] Update the website information, favicon, and logo icons in
docs/*.
License
MIT License © 2024-PRESENT Kieran Wang
