Skip to content
Open
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: 1 addition & 0 deletions .agents/skills/vite-plus
88 changes: 88 additions & 0 deletions .agents/vite-plus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!--VITE PLUS START-->

# Using Vite+, the Unified Toolchain for the Web

This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`.

## Vite+ Workflow

`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.

### Start

- create - Create a new project from a template
- migrate - Migrate an existing project to Vite+
- config - Configure hooks and agent integration
- staged - Run linters on staged files
- install (`i`) - Install dependencies
- env - Manage Node.js versions

### Develop

- dev - Run the development server
- check - Run format, lint, and TypeScript type checks
- lint - Lint code
- fmt - Format code
- test - Run tests

### Execute

- run - Run monorepo tasks
- exec - Execute a command from local `node_modules/.bin`
- dlx - Execute a package binary without installing it as a dependency
- cache - Manage the task cache

### Build

- build - Build for production
- pack - Build libraries
- preview - Preview production build

### Manage Dependencies

Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles.

- add - Add packages to dependencies
- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies
- update (`up`) - Update packages to latest versions
- dedupe - Deduplicate dependencies
- outdated - Check for outdated packages
- list (`ls`) - List installed packages
- why (`explain`) - Show why a package is installed
- info (`view`, `show`) - View package information from the registry
- link (`ln`) / unlink - Manage local package links
- pm - Forward a command to the package manager

### Maintain

- upgrade - Update `vp` itself to the latest version

These commands map to their corresponding tools. For example, `vp dev --port 3000` runs Vite's dev server and works the same as Vite. `vp test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vp --version`. This is useful when researching documentation, features, and bugs.

## Common Pitfalls

- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
- **Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead.
- **Running scripts:** Vite+ built-in commands (`vp dev`, `vp build`, `vp test`, etc.) always run the Vite+ built-in tool, not any `package.json` script of the same name. To run a custom script that shares a name with a built-in command, use `vp run <script>`. For example, if you have a custom `dev` script that runs multiple services concurrently, run it with `vp run dev`, not `vp dev` (which always starts Vite's dev server).
- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands.
- **Use Vite+ wrappers for one-off binaries:** Use `vp dlx` instead of package-manager-specific `dlx`/`npx` commands.
- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.

## CI Integration

For GitHub Actions, consider using [`voidzero-dev/setup-vp`](https://github.com/voidzero-dev/setup-vp) to replace separate `actions/setup-node`, package-manager setup, cache, and install steps with a single action.

```yaml
- uses: voidzero-dev/setup-vp@v1
with:
cache: true
- run: vp check
- run: vp test
```

## Review Checklist for Agents

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to validate changes.
<!--VITE PLUS END-->
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

36 changes: 0 additions & 36 deletions .oxfmtrc.json

This file was deleted.

82 changes: 0 additions & 82 deletions .oxlintrc.json

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
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["oxc.oxc-vscode", "bradlc.vscode-tailwindcss"]
"recommendations": ["VoidZero.vite-plus-extension-pack", "bradlc.vscode-tailwindcss"]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
// enable oxlint + oxfmt
"oxc.enable": true,

// oxfmt via vite+
"oxc.fmt.configPath": "./vite.config.ts",

// set oxfmt as default formatter
"editor.defaultFormatter": "oxc.oxc-vscode"
}
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [Auth patterns](.agents/auth.md) - Route guards, middleware, auth utilities
- [TypeScript conventions](.agents/typescript.md) - Casting rules, prefer type inference
- [Workflow](.agents/workflow.md) - Workflow commands, validation approach
- [Vite+](.agents/vite-plus.md) - Vite+ commands, common pitfalls

<!-- intent-skills:start -->

Expand All @@ -24,12 +25,13 @@ skills:
- task: "general TanStack Router and @tanstack/react-router docs for routes, layouts, route tree, and navigation"
load: "node_modules/@tanstack/react-router/dist/llms/index.js"
- task: "general TanStack Start and @tanstack/react-start docs for app structure, patterns, and server features"
load: "node_modules/@tanstack/react-start/skills/react-start/SKILL.md"
load: "node_modules/@tanstack/react-start/skills/react-start/SKILL.md"

<!-- intent-skills:end -->

## TanStack Docs

Use `pnpm tanstack` (which is aliased to `pnpm dlx @tanstack/cli@latest` in `package.json`) to look up TanStack documentation. Always pass `--json` for machine-readable output.
Use `pnpm tanstack` (which is aliased to `vpx @tanstack/cli@latest` in `package.json`) to look up TanStack documentation. Always pass `--json` for machine-readable output.

```bash
# List TanStack libraries (optionally filter by --group state|headlessUI|performance|tooling)
Expand Down
51 changes: 23 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"dev": "vp dev",
"build": "vp build",
"preview": "vp preview",
"start": "node .output/server/index.mjs",
"lint": "oxlint --type-aware --type-check",
"lint:fix": "oxlint --type-aware --type-check --fix",
"format": "oxfmt",
"format:check": "oxfmt --check",
"check": "pnpm format && pnpm lint",
"prepare": "husky",
"lint": "vp lint --type-aware --type-check",
"lint:fix": "vp lint --type-aware --type-check --fix",
"format": "vp fmt",
"format:check": "vp fmt --check",
"check": "vp check",
"check:fix": "vp check --fix",
"prepare": "vp config",
"db": "drizzle-kit",
"deps": "pnpm dlx taze@latest -Ilw",
"deps:major": "pnpm dlx taze@latest major -Ilw",
"tanstack": "pnpm dlx @tanstack/cli@latest",
"ui": "pnpm dlx shadcn@latest",
"auth": "pnpm dlx auth@latest",
"auth:secret": "pnpm dlx auth@latest secret",
"auth:generate": "pnpm dlx auth@latest generate --config ./src/lib/auth/auth.ts --y --output ./src/lib/db/schema/auth.schema.ts",
"auth:migrate": "pnpm run auth:generate && pnpm run db generate && pnpm run db migrate",
"skills": "pnpm dlx skills@latest",
"intent": "pnpm dlx @tanstack/intent@latest"
"deps": "vpx taze@latest -Ilw",
"deps:major": "vpx taze@latest major -Ilw",
"tanstack": "vpx @tanstack/cli@latest",
"ui": "vpx shadcn@latest",
"auth": "vpx auth@latest",
"auth:secret": "vpx auth@latest secret",
"auth:generate": "vpx auth@latest generate --config ./src/lib/auth/auth.ts --y --output ./src/lib/db/schema/auth.schema.ts",
"auth:migrate": "vp run auth:generate && vp run db generate && vp run db migrate",
"skills": "vpx skills@latest",
"intent": "vpx @tanstack/intent@latest"
},
"dependencies": {
"@base-ui/react": "^1.3.0",
Expand Down Expand Up @@ -67,19 +68,13 @@
"babel-plugin-react-compiler": "^1.0.0",
"drizzle-kit": "^0.31.10",
"eslint-plugin-react-hooks": "^7.0.1",
"husky": "9.1.7",
"lint-staged": "^16.4.0",
"nitro": "^3.0.260311-beta",
"oxfmt": "^0.44.0",
"oxlint": "^1.59.0",
"oxlint-tsgolint": "^0.20.0",
"tailwindcss": "^4.2.2",
"tw-animate-css": "^1.4.0",
"typescript": "^6.0.2",
"vite": "^8.0.5"
},
"lint-staged": {
"*": "oxfmt --no-error-on-unmatched-pattern"
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@10.33.0",
"generator": "create-mugnavo"
}
14 changes: 14 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: "catalog:"
vitest: "catalog:"
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: "*"
vitest: "*"
Loading