Skip to content

zadzbw/vite-lib-template

Repository files navigation

vite-lib-template 📃

A vite template for creating a library with typescript, eslint, prettier, vitest, husky and lint-staged.

Features 🎸

  • support commonjs, esm and umd bundles
  • auto-generated types
  • eslint
  • prettier
  • vitest
  • husky + lint-staged

Try it now 🚀

GitHub template

Use this template to create a new repo.

Clone to local

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

  1. download the template
npx degit zadzbw/vite-lib-template my-app
  1. push to your own repo
cd my-app

git init
git add .
git commit -m "commit message"
git remote add origin https://github.com/username/repositoryname.git
git push -u origin main
  1. install dependencies
npm install pnpm --global
pnpm install --frozen-lockfile

and then you can start creating your library.