- 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 --activateotherwise see the pnpm install guide
Install dependencies
pnpm installVite 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 lintPrettier is used for formatting
pnpm formatVitest is used for testing. It is syntax compatible with Jest but is faster and has better error messages.
pnpm testHusky 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 prepareCommitLint 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 publishThis project is based on ts-library