- Vite
- Pnpm
- ESLint
- Prettier
- Vitest
- Husky
- CommitLint
If you have node v16 or later then use the below command to install pnpm
corepack enable
corepack prepare pnpm@latest --activate
otherwise see the pnpm install guide
Install dependencies
pnpm install
Vite is used as the bundler. It is a fast bundler that uses esbuild under the hood. It also supports hot module reloading.
pnpm is used as the package manager.
ESLint is used for linting
pnpm lint
Prettier is used for formatting
pnpm format
Vitest is used for testing. It is syntax compatible with Jest but is faster and has better error messages.
pnpm test
Husky is used for pre-commit hook. it ensures that the code is linted and formatted before committing. It also ensures that the commit message is formatted correctly
pnpm prepare
CommitLint is used for commit message linting. Commit Convention
<type>(<scope?>): <subject>
Set the name of the package in package.json
{
"name": "my-package"
}
Set the author of the package in package.json
{
"author": { "name": "John Doe", "url": "https://example.com" }
}
Set the version of the package in package.json
{
"version": "0.0.1"
}
Set the private field to false in package.json
{
"private": false
}
Publish the package
pnpm publish
This project is based on ts-library