pp
v1.0.0
Published
Just a builder for now
Readme
Project Name: pp
Overview
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.
Scripts
- 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.
Development Dependencies
- @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.
Getting Started
Install dependencies:
npm installInstall Lefthook:
npx lefthook installStart the development server:
npm run devBuild the project:
npm run buildPreview the built project:
npm run previewLint the project:
npm run lintLint and fix markdown files:
npm run lint:mdFormat the code:
npm run formatCheck spelling:
npm run cspellRelease locally:
npm run release:localRun tests:
npm run testRun CI script:
npm run ci
Git Hooks
This project uses Lefthook to manage Git hooks.
Pre-commit Hook
Runs Biome to check and fix issues in staged files before committing.
Commit Message Hook
Uses Commitlint to ensure commit messages follow the conventional commit format.
Pre-push Hook
Runs CSpell to check for spelling errors in the code before pushing.
Runs markdownlint to check and fix issues in markdown files before pushing.
Continuous Integration
This project uses GitHub Actions for continuous integration. The CI workflow is defined in .github/workflows/ci.yml.
CI Workflow
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@v4to checkout the repository. - Setup Node.js: Uses
actions/setup-node@v4to set up Node.js version 20. - Install dependencies: Runs
npm installto install project dependencies. - Run CI script: Runs
npm run cito lint, build, and test the project.
License
This project is licensed under the MIT License.
