pp
v1.0.0
Published
Just a builder for now
Downloads
22
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 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
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@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.
License
This project is licensed under the MIT License.