/vite-library-strict-mode

Vite Template in Library Mode: JavaScript / TypeScript + Unit Tests + Linter + Formatter + Commit Lint + Git Hooks + ...

Primary LanguageJavaScriptMIT LicenseMIT

Vite-Library-Strict-Mode

Vite Library Strict Mode


English | 简体中文

Intro

Vite Template in Library Mode: JavaScript / TypeScript + Unit Tests + Linters + Formatters + Commit Lint + Git Hooks + Semantic Versioning + ...

Integrated Features

  • Vite Library Mode
  • Commit Lint - Conventional Commit
  • Change Log - Conventional Change Log
  • Vitest - Blazing Fast Vite-native Unit Test Framework
  • Prettier - Opinionated Code Formatter
  • ESLint - Pluggable JavaScript Linter
  • simple-git-hooks - DIY Git Hooks
  • lint-staged - Lint Staged Files
  • standard-version - Semantic Versioning

Here We Go

Step1: Use this template

Click the green "Use this template" button and choose to "create a new repository".

In this Github Template Repository, we use JavaScript as our default programming language.

If you want to use TypeScript, you can checkout to the "ts" branch and use it as the main branch.

Step2: Clone your repository to local

# clone to local
git clone your_repo_url

# remove the .git directory
cd your_repo
rm -rf .git

# init a repository to reset the history
git init

# install 3rd-party modules
npm install

Step3: DIY your config

  • Modify the config in package.json, such like name, author and so on.
  • Remove the LICENSE file. DIY your own LICENSE. In this template, we use MIT LICENSE as default. If you want to use it too, you must replace the author with your own name in the LICENSE file.
  • DIY your README.md & remove README.zh-CN.md as you wish.
  • DIY other config as you wish.