Skip to content

Commit 6b1e6f6

Browse files
fix: use vp instead of vite in CLI references (#572)
Updates calls previously done to `vite` to `vp`, as well as AGENTS.md Please double check occurrences, I might've missed some or accidentally changed too much! Co-authored-by: Alexander Lichter <github@lichter.io> Supersedes #568 Co-authored-by: Alexander Lichter <github@lichter.io>
1 parent a29ac83 commit 6b1e6f6

5 files changed

Lines changed: 31 additions & 31 deletions

File tree

.github/workflows/upgrade-deps.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ jobs:
8787
- If `Cargo.toml` has been modified, you need to run `cargo shear` to ensure there is nothing wrong with our dependencies.
8888
- Run `cargo check --all-targets --all-features` to ensure everything works fine if any Rust related codes are modified.
8989
- Run the following commands to ensure everything works fine:
90-
vite -h
91-
vite run -h
92-
vite lint -h
93-
vite test -h
94-
vite build -h
95-
vite fmt -h
90+
vp -h
91+
vp run -h
92+
vp lint -h
93+
vp test -h
94+
vp build -h
95+
vp fmt -h
9696
9797
Help me fix the errors in `build-upstream` steps, no need to commit changes after your fixing.
9898
claude_args: |

bench/generate-monorepo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ module.exports = { ${pkg.name.replace('-', '_')} };
255255
private: true,
256256
workspaces: ['packages/*'],
257257
scripts: {
258-
'build:all': 'vite run build',
259-
'test:all': 'vite run test',
260-
'lint:all': 'vite run lint',
258+
'build:all': 'vp run build',
259+
'test:all': 'vp run test',
260+
'lint:all': 'vp run lint',
261261
},
262262
devDependencies: {
263263
'vite-plus': '*',

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"copy-cli-binding": "pnpm --filter=vite-plus-cli copy-binding",
1212
"install-global-cli": "pnpm copy-cli-binding && tool install-global-cli",
1313
"tsgo": "tsgo -b tsconfig.json",
14-
"lint": "vite lint --type-aware --threads 4",
15-
"test": "vite test run && pnpm -r snap-test",
16-
"fmt": "vite fmt",
17-
"test:unit": "vite test run",
14+
"lint": "vp lint --type-aware --threads 4",
15+
"test": "vp test run && pnpm -r snap-test",
16+
"fmt": "vp fmt",
17+
"test:unit": "vp test run",
1818
"docs:dev": "pnpm --filter=./docs dev",
1919
"docs:build": "pnpm --filter=./docs build",
2020
"prepare": "husky"
@@ -40,8 +40,8 @@
4040
},
4141
"lint-staged": {
4242
"*.@(js|ts|tsx)": [
43-
"vite run lint --fix",
44-
"vite fmt --no-error-on-unmatched-pattern"
43+
"vp run lint --fix",
44+
"vp fmt --no-error-on-unmatched-pattern"
4545
],
4646
"*.rs": [
4747
"cargo fmt --"

packages/global/AGENTS.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# Using Vite+, the Unified Toolchain for the Web
44

5-
This project is using Vite+, a modern toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, and Oxfmt. Vite+ wraps these tools and package manager commands in a single, global CLI called `vite`. Vite+ is distinct from Vite, but it invokes Vite through `vite dev` and `vite build`.
5+
This project is using Vite+, a modern toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, and Oxfmt. Vite+ wraps these tools and package manager commands in a single, global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`.
66

77
## Vite+ Workflow
88

9-
`vite` is a global binary that handles the full development lifecycle. Run `vite help` to print a list of commands and `vite <command> --help` for information about a specific command.
9+
`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.
1010

1111
### Vite+ Commands
1212

@@ -20,7 +20,7 @@ This project is using Vite+, a modern toolchain built on top of Vite, Rolldown,
2020
- new - Create a new monorepo package (in-project) or a new project (global)
2121
- run - Run tasks from `package.json` scripts
2222

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

2525
### Package Manager Commands
2626

@@ -41,14 +41,14 @@ Vite+ automatically detects and wraps the underlying package manager such as pnp
4141
## Common Pitfalls
4242

4343
- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
44-
- **Always use Vite commands to run tools:** Don't attempt to run `vite vitest` or `vite oxlint`. They do not exist. Use `vite test` and `vite lint` instead.
45-
- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vite test` command, run it using `vite run test`.
44+
- **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.
45+
- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vp test` command, run it using `vp run test`.
4646
- **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.
4747
- **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.
48-
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vite lint --type-aware` works out of the box.
48+
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.
4949

5050
## Review Checklist for Agents
5151

52-
- [ ] Run `vite install` after pulling remote changes and before getting started.
53-
- [ ] Run `vite lint`, `vite fmt`, and `vite test` to validate changes.
52+
- [ ] Run `vp install` after pulling remote changes and before getting started.
53+
- [ ] Run `vp lint`, `vp fmt`, and `vp test` to validate changes.
5454
<!--VITE PLUS END-->

vite.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ export default defineConfig({
7575
tasks: {
7676
'build:src': {
7777
command: [
78-
'vite run @rolldown/pluginutils#build',
79-
'vite run rolldown#build-binding:release',
80-
'vite run rolldown#build-node',
81-
'vite run vite#build-types',
82-
'vite run @voidzero-dev/vite-plus-core#build',
83-
'vite run @voidzero-dev/vite-plus-test#build',
84-
'vite run vite-plus#build',
85-
'vite run vite-plus-cli#build',
78+
'vp run @rolldown/pluginutils#build',
79+
'vp run rolldown#build-binding:release',
80+
'vp run rolldown#build-node',
81+
'vp run vite#build-types',
82+
'vp run @voidzero-dev/vite-plus-core#build',
83+
'vp run @voidzero-dev/vite-plus-test#build',
84+
'vp run vite-plus#build',
85+
'vp run vite-plus-cli#build',
8686
].join(' && '),
8787
},
8888
},

0 commit comments

Comments
 (0)