Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions .vite-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vp staged
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ To create a release build of Vite+ and all upstream dependencies, run:
just build
```

## Git Hooks (optional)

Pre-commit checks are opt-in. Run `vp config` after a build to install the hook dispatcher; each commit then runs `vp staged` on staged files. `vp staged` loads its config from `vite.config.ts` and needs the built JS packages, so build first. Opt out with `vp hooks disable`, or skip one run with `VP_GIT_HOOKS=0`. If husky was active in your clone before, run `git config --unset core.hooksPath` once first.

## Install the Vite+ Global CLI from source code

```bash
Expand Down
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"docs:dev": "pnpm -C docs dev",
"docs:build": "pnpm -C docs build",
"docs:update-trusted-stack-stats": "pnpm -C docs update-trusted-stack-stats",
"prepare": "husky"
"prepare": "vp config"
},
"devDependencies": {
"@emnapi/core": "catalog:",
Expand All @@ -30,18 +30,12 @@
"@types/node": "catalog:",
"@typescript/native-preview": "catalog:",
"@voidzero-dev/vite-plus-tools": "workspace:*",
"husky": "catalog:",
"lint-staged": "catalog:",
"playwright": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-plus": "workspace:*",
"vitest": "catalog:"
},
"lint-staged": {
"*.@(js|ts|tsx|md|yaml|yml)": "vp check --fix",
"*.rs": "cargo fmt --"
},
"engines": {
"node": ">=22.18.0"
},
Expand Down
16 changes: 0 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ catalog:
fresh-import: ^0.2.1
fs-extra: ^11.4.0
glob: ^13.0.0
husky: ^9.1.7
jsonc-parser: ^3.3.1
# Kept in lockstep with the bundled @tsdown/css by .github/scripts/upgrade-deps.ts
lightningcss: ^1.33.0
Expand Down
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { defineConfig } from 'vite-plus';

export default defineConfig({
staged: {
'*.@(js|ts|tsx|md|yaml|yml)': 'vp check --fix',
'*.rs': 'cargo fmt --',
},
lint: {
options: {
typeAware: true,
Expand Down
Loading