This project is a basic setup using Vite for development and build processes, along with TypeScript for type checking and Biome for linting and formatting.
- dev: Starts the development server using Vite.
- build: Compiles TypeScript and builds the project using Vite.
- preview: Previews the built project using Vite.
- lint: Lints the project using Biome.
- lint:md: Lints and fixes markdown files using markdownlint.
- format: Formats the code using Biome.
- release:local: Updates version and publishes changes locally using Changesets.
- prepublishOnly: Runs the CI script before publishing.
- test: Runs tests using Vitest.
- ci: Runs linting, markdown linting, export linting, builds the project, and runs tests.
- @biomejs/biome: A tool for linting and formatting.
- typescript: A language for application-scale JavaScript.
- vite: A build tool that aims to provide a faster and leaner development experience for modern web projects.
- lefthook: A tool for managing Git hooks.
- @commitlint/cli: A tool for linting commit messages.
- @commitlint/config-conventional: A shareable commitlint configuration for conventional commits.
- cspell: A spell checker for code.
- markdownlint-cli: A command-line interface for linting markdown files.
- @changesets/cli: A tool for managing versioning and publishing.
- vitest: A test runner for Vite projects.
-
Install dependencies:
npm install
-
Install Lefthook:
npx lefthook install
-
Start the development server:
npm run dev
-
Build the project:
npm run build
-
Preview the built project:
npm run preview
-
Lint the project:
npm run lint
-
Lint and fix markdown files:
npm run lint:md
-
Format the code:
npm run format
-
Check spelling:
npm run cspell
-
Release locally:
npm run release:local
-
Run tests:
npm run test
-
Run CI script:
npm run ci
This project uses Lefthook to manage Git hooks.
Runs Biome to check and fix issues in staged files before committing.
Uses Commitlint to ensure commit messages follow the conventional commit format.
Runs CSpell to check for spelling errors in the code before pushing.
Runs markdownlint to check and fix issues in markdown files before pushing.
This project uses GitHub Actions for continuous integration. The CI workflow is defined in .github/workflows/ci.yml
.
The CI workflow runs on every push to the main
branch and on pull requests. It performs the following steps:
-
Checkout code: Uses
actions/checkout@v4
to checkout the repository. -
Setup Node.js: Uses
actions/setup-node@v4
to set up Node.js version 20. -
Install dependencies: Runs
npm install
to install project dependencies. -
Run CI script: Runs
npm run ci
to lint, build, and test the project.
This project is licensed under the MIT License.