https://github.com/starter-collective/starter-lib-ts
TypeScript library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.
https://github.com/starter-collective/starter-lib-ts
cjs docs eslint esm i18n iife library npm pnpm starter template tsup typescript vitepress vitest
Last synced: 4 months ago
JSON representation
TypeScript library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.
- Host: GitHub
- URL: https://github.com/starter-collective/starter-lib-ts
- Owner: starter-collective
- License: mit
- Created: 2024-08-28T05:41:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-09T02:30:10.000Z (about 1 year ago)
- Last Synced: 2025-09-23T19:26:12.167Z (9 months ago)
- Topics: cjs, docs, eslint, esm, i18n, iife, library, npm, pnpm, starter, template, tsup, typescript, vitepress, vitest
- Language: TypeScript
- Homepage: https://starter-lib-ts.netlify.app
- Size: 373 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TypeScript Library Starter Template
[](https://github.com/starter-collective/starter-lib-ts/releases)
[](https://www.npmjs.com/package/starter-lib-ts)
[](https://github.com/starter-collective/starter-lib-ts/actions/workflows/ci.yml)
[](https://app.netlify.com/sites/starter-lib-ts/deploys)
TypeScript library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.
- [Live Demo](https://starter-lib-ts.netlify.app/)
- [Play on Stackblitz](https://stackblitz.com/github/starter-collective/starter-lib-ts)
## Features
- Build package with [tsup](https://tsup.egoist.dev/) - Bundle your TypeScript library with no config.
- Out-of-the-box unit testing with [Vitest](https://github.com/vitest-dev/vitest).
- [VitePress](https://vitepress.dev/) documentation - Deploy on [Netlify](https://app.netlify.com/) with zero-config, supports other deployment methods as well.
- Manage versions using the [bumpp](https://github.com/antfu-collective/bumpp), and publish to npm with zero-configPublish to [npm](https://www.npmjs.com) with zero-config.
## Usage
[Create a repo](https://github.com/starter-collective/starter-lib-ts/generate) from this template on GitHub.
```bash
git clone
```
Install npm dependencies.
```bash
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.
```bash
pnpm dev
```
Open documentation for the library, you can run:
```bash
pnpm docs:dev
```
To build the library, you can run:
```bash
pnpm build
```
If you want to publish it, you can run:
```bash
pnpm release
```
## Clean Template
If you prefer to do it manually with the cleaner git history:
```bash
npx degit starter-collective/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 package name in `package.json` and the global `iife` variable in `tsup.config.ts`.
- [ ] Update the website information, favicon, and logo icons in `docs/*`.
## License
[MIT License](./LICENSE) © 2024-PRESENT [Kieran Wang](https://github.com/kieranwv/)