vite-plus 0.1.13 → 0.1.14-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -0
- package/README.md +4 -0
- package/dist/global/{agent-BuEmv_K7.js → agent-DTz-Dh1r.js} +12 -30
- package/dist/global/{cli-truncate-BmIULUG7.js → cli-truncate-Da6Y8aM8.js} +2 -2
- package/dist/global/compat-Ch3iWOnQ.js +14 -0
- package/dist/global/config.js +1 -3
- package/dist/global/create.js +37 -8
- package/dist/global/{log-update-Beldo2tV.js → log-update-C8WCYCbc.js} +3 -3
- package/dist/global/migrate.js +22 -6
- package/dist/global/{package-D0VpX-8d.js → package-Y1UTfJnZ.js} +26 -1
- package/dist/global/report-C7xbSNED.js +28 -0
- package/dist/global/{slice-ansi-1i6Zdm-R.js → slice-ansi-Fap0ehe9.js} +1 -1
- package/dist/global/staged.js +62 -6
- package/dist/global/version.js +1 -1
- package/dist/global/{workspace-CVWspacc.js → workspace-BlrOxcHM.js} +3 -3
- package/dist/global/{wrap-ansi-CnYUWev2.js → wrap-ansi-eywLlPVQ.js} +1 -1
- package/dist/global/wrap-ansi-yd4eUCl_.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/migration/migrator.js +26 -11
- package/dist/pack-bin.js +3 -1
- package/dist/resolve-vite-config.d.ts +9 -1
- package/dist/resolve-vite-config.js +78 -1
- package/dist/test/optional-runtime-types.js.d.ts +2 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/editor.js +1 -1
- package/dist/utils/package.d.ts +6 -0
- package/dist/utils/package.js +19 -0
- package/package.json +21 -14
- package/skills/vite-plus/docs/config/build.md +21 -0
- package/skills/vite-plus/docs/config/fmt.md +18 -0
- package/skills/vite-plus/docs/config/index.md +31 -0
- package/skills/vite-plus/docs/config/lint.md +24 -0
- package/skills/vite-plus/docs/config/pack.md +17 -0
- package/skills/vite-plus/docs/config/run.md +231 -0
- package/skills/vite-plus/docs/config/staged.md +15 -0
- package/skills/vite-plus/docs/config/test.md +18 -0
- package/skills/vite-plus/docs/guide/build.md +40 -0
- package/skills/vite-plus/docs/guide/cache.md +119 -0
- package/skills/vite-plus/docs/guide/check.md +41 -0
- package/skills/vite-plus/docs/guide/ci.md +64 -0
- package/skills/vite-plus/docs/guide/commit-hooks.md +51 -0
- package/skills/vite-plus/docs/guide/create.md +88 -0
- package/skills/vite-plus/docs/guide/dev.md +24 -0
- package/skills/vite-plus/docs/guide/env.md +84 -0
- package/skills/vite-plus/docs/guide/fmt.md +41 -0
- package/skills/vite-plus/docs/guide/ide-integration.md +36 -0
- package/skills/vite-plus/docs/guide/implode.md +23 -0
- package/skills/vite-plus/docs/guide/index.md +114 -0
- package/skills/vite-plus/docs/guide/install.md +130 -0
- package/skills/vite-plus/docs/guide/lint.md +50 -0
- package/skills/vite-plus/docs/guide/migrate.md +174 -0
- package/skills/vite-plus/docs/guide/pack.md +61 -0
- package/skills/vite-plus/docs/guide/run.md +292 -0
- package/skills/vite-plus/docs/guide/test.md +35 -0
- package/skills/vite-plus/docs/guide/troubleshooting.md +71 -0
- package/skills/vite-plus/docs/guide/upgrade.md +28 -0
- package/skills/vite-plus/docs/guide/vpx.md +66 -0
- package/skills/vite-plus/docs/guide/why.md +39 -0
- package/dist/global/wrap-ansi-DAqB-SZm.js +0 -3
- package/dist/oxfmt-config.d.ts +0 -1
- package/dist/oxfmt-config.js +0 -0
- /package/dist/global/{src-FkMgH-SM.js → src-B-pcmd0F.js} +0 -0
- /package/dist/global/{strip-ansi-DbamwI77.js → strip-ansi-CE-VDMdw.js} +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# Run
|
|
2
|
+
|
|
3
|
+
`vp run` runs `package.json` scripts and tasks defined in `vite.config.ts`. It works like `pnpm run`, with caching, dependency ordering, and workspace-aware execution built in.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Use `vp run` with existing `package.json` scripts:
|
|
8
|
+
|
|
9
|
+
```json [package.json]
|
|
10
|
+
{
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "node compile-legacy-app.js",
|
|
13
|
+
"test": "jest"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`vp run build` executes the associated build script:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
$ node compile-legacy-app.js
|
|
22
|
+
|
|
23
|
+
building legacy app for production...
|
|
24
|
+
|
|
25
|
+
✓ built in 69s
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Use `vp run` without a task name to use the interactive task runner:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Select a task (↑/↓, Enter to run, Esc to clear):
|
|
32
|
+
|
|
33
|
+
› build: node compile-legacy-app.js
|
|
34
|
+
test: jest
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Caching
|
|
38
|
+
|
|
39
|
+
`package.json` scripts are not cached by default. Use `--cache` to enable caching:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
vp run --cache build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
$ node compile-legacy-app.js
|
|
47
|
+
✓ built in 69s
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If nothing changes, the output is replayed from the cache on the next run:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
$ node compile-legacy-app.js ✓ cache hit, replaying
|
|
54
|
+
✓ built in 69s
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
vp run: cache hit, 69s saved.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If an input changes, the task runs again:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
$ node compile-legacy-app.js ✗ cache miss: 'legacy/index.js' modified, executing
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Task Definitions
|
|
67
|
+
|
|
68
|
+
Vite Task automatically tracks which files your command uses. You can define tasks directly in `vite.config.ts` to enable caching by default or control which files and environment variables affect cache behavior.
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { defineConfig } from 'vite-plus';
|
|
72
|
+
|
|
73
|
+
export default defineConfig({
|
|
74
|
+
run: {
|
|
75
|
+
tasks: {
|
|
76
|
+
build: {
|
|
77
|
+
command: 'vp build',
|
|
78
|
+
dependsOn: ['lint'],
|
|
79
|
+
env: ['NODE_ENV'],
|
|
80
|
+
},
|
|
81
|
+
deploy: {
|
|
82
|
+
command: 'deploy-script --prod',
|
|
83
|
+
cache: false,
|
|
84
|
+
dependsOn: ['build', 'test'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If you want to run an existing `package.json` script as-is, use `vp run <script>`. If you want task-level caching, dependencies, or environment/input controls, define a task with an explicit `command`. A task name can come from `vite.config.ts` or `package.json`, but not both.
|
|
92
|
+
|
|
93
|
+
::: info
|
|
94
|
+
Tasks defined in `vite.config.ts` are cached by default. `package.json` scripts are not. See [When Is Caching Enabled?](/guide/cache#when-is-caching-enabled) for the full resolution order.
|
|
95
|
+
:::
|
|
96
|
+
|
|
97
|
+
See [Run Config](/config/run) for the full `run` block reference.
|
|
98
|
+
|
|
99
|
+
## Task Dependencies
|
|
100
|
+
|
|
101
|
+
Use [`dependsOn`](#depends-on) to run tasks in the right order. Running `vp run deploy` with the config above runs `build` and `test` first. Dependencies can also target other packages in the same project with the `package#task` notation:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
dependsOn: ['@my/core#build', '@my/utils#lint'];
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Running in a Workspace
|
|
108
|
+
|
|
109
|
+
With no package-selection flags, `vp run` runs the task in the package in your current working directory:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
cd packages/app
|
|
113
|
+
vp run build
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
You can also target a package explicitly from anywhere:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
vp run @my/app#build
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Workspace package ordering is based on the normal monorepo dependency graph declared in each package's `package.json`. In other words, when Vite+ talks about package dependencies, it means the regular `dependencies` relationships between workspace packages, not a separate task-runner-specific graph.
|
|
123
|
+
|
|
124
|
+
### Recursive (`-r`)
|
|
125
|
+
|
|
126
|
+
Run the task in every workspace package, in dependency order:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
vp run -r build
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
That dependency order comes from the workspace packages referenced through `package.json` dependencies.
|
|
133
|
+
|
|
134
|
+
### Transitive (`-t`)
|
|
135
|
+
|
|
136
|
+
Run the task in one package and all of its dependencies:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
vp run -t @my/app#build
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
If `@my/app` depends on `@my/utils`, which depends on `@my/core`, this runs all three in order. Vite+ resolves that chain from the normal workspace package dependencies declared in `package.json`.
|
|
143
|
+
|
|
144
|
+
### Filter (`--filter`)
|
|
145
|
+
|
|
146
|
+
Select packages by name, directory, or glob pattern. The syntax matches pnpm's `--filter`:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# By name
|
|
150
|
+
vp run --filter @my/app build
|
|
151
|
+
|
|
152
|
+
# By glob
|
|
153
|
+
vp run --filter "@my/*" build
|
|
154
|
+
|
|
155
|
+
# By directory
|
|
156
|
+
vp run --filter ./packages/app build
|
|
157
|
+
|
|
158
|
+
# Include dependencies
|
|
159
|
+
vp run --filter "@my/app..." build
|
|
160
|
+
|
|
161
|
+
# Include dependents
|
|
162
|
+
vp run --filter "...@my/core" build
|
|
163
|
+
|
|
164
|
+
# Exclude packages
|
|
165
|
+
vp run --filter "@my/*" --filter "!@my/utils" build
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Multiple `--filter` flags are combined as a union. Exclusion filters are applied after all inclusions.
|
|
169
|
+
|
|
170
|
+
### Workspace Root (`-w`)
|
|
171
|
+
|
|
172
|
+
Explicitly run the task in the workspace root package:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
vp run -w build
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Compound Commands
|
|
179
|
+
|
|
180
|
+
Commands joined with `&&` are split into independent sub-tasks. Each sub-task is cached separately when [caching is enabled](/guide/cache#when-is-caching-enabled). This works for both `vite.config.ts` tasks and `package.json` scripts:
|
|
181
|
+
|
|
182
|
+
```json [package.json]
|
|
183
|
+
{
|
|
184
|
+
"scripts": {
|
|
185
|
+
"check": "vp lint && vp build"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Now, run `vp run --cache check`:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
$ vp lint
|
|
194
|
+
Found 0 warnings and 0 errors.
|
|
195
|
+
|
|
196
|
+
$ vp build
|
|
197
|
+
✓ built in 28ms
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
vp run: 0/2 cache hit (0%).
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Each sub-task has its own cache entry. If only `.ts` files changed but lint still passes, only `vp build` runs again the next time `vp run --cache check` is called:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
$ vp lint ✓ cache hit, replaying
|
|
207
|
+
$ vp build ✗ cache miss: 'src/index.ts' modified, executing
|
|
208
|
+
✓ built in 30ms
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
vp run: 1/2 cache hit (50%), 120ms saved.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Nested `vp run`
|
|
215
|
+
|
|
216
|
+
When a command contains `vp run`, Vite Task inlines it as separate tasks instead of spawning a nested process. Each sub-task is cached independently and output stays flat:
|
|
217
|
+
|
|
218
|
+
```json [package.json]
|
|
219
|
+
{
|
|
220
|
+
"scripts": {
|
|
221
|
+
"ci": "vp run lint && vp run test && vp run build"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Running `vp run ci` expands into three tasks:
|
|
227
|
+
|
|
228
|
+
```mermaid
|
|
229
|
+
graph LR
|
|
230
|
+
lint --> test --> build
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Flags also work inside nested scripts. For example, `vp run -r build` inside a script expands into individual build tasks for every package.
|
|
234
|
+
|
|
235
|
+
::: info
|
|
236
|
+
A common monorepo pattern is a root script that runs a task recursively:
|
|
237
|
+
|
|
238
|
+
```json [package.json (root)]
|
|
239
|
+
{
|
|
240
|
+
"scripts": {
|
|
241
|
+
"build": "vp run -r build"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
This creates a potential recursion: root's `build` -> `vp run -r build` -> includes root's `build` -> ...
|
|
247
|
+
|
|
248
|
+
Vite Task detects this and prunes the self-reference automatically, so other packages build normally.
|
|
249
|
+
:::
|
|
250
|
+
|
|
251
|
+
## Execution Summary
|
|
252
|
+
|
|
253
|
+
Use `-v` to show a detailed execution summary:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
vp run -r -v build
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
261
|
+
Vite+ Task Runner • Execution Summary
|
|
262
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
263
|
+
|
|
264
|
+
Statistics: 3 tasks • 3 cache hits • 0 cache misses
|
|
265
|
+
Performance: 100% cache hit rate, 468ms saved in total
|
|
266
|
+
|
|
267
|
+
Task Details:
|
|
268
|
+
────────────────────────────────────────────────
|
|
269
|
+
[1] @my/core#build: ~/packages/core$ vp build ✓
|
|
270
|
+
→ Cache hit - output replayed - 200ms saved
|
|
271
|
+
·······················································
|
|
272
|
+
[2] @my/utils#build: ~/packages/utils$ vp build ✓
|
|
273
|
+
→ Cache hit - output replayed - 150ms saved
|
|
274
|
+
·······················································
|
|
275
|
+
[3] @my/app#build: ~/packages/app$ vp build ✓
|
|
276
|
+
→ Cache hit - output replayed - 118ms saved
|
|
277
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Use `--last-details` to show the summary from the last run without running tasks again:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
vp run --last-details
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Additional Arguments
|
|
287
|
+
|
|
288
|
+
Arguments after the task name are passed through to the task command:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
vp run test --reporter verbose
|
|
292
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Test
|
|
2
|
+
|
|
3
|
+
`vp test` runs tests with [Vitest](https://vitest.dev).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`vp test` is built on [Vitest](https://vitest.dev/), so you get a Vite-native test runner that reuses your Vite config and plugins, supports Jest-style expectations, snapshots, and coverage, and handles modern ESM, TypeScript, and JSX projects cleanly.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
vp test
|
|
13
|
+
vp test watch
|
|
14
|
+
vp test run --coverage
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
::: info
|
|
18
|
+
Unlike Vitest on its own, `vp test` does not stay in watch mode by default. Use `vp test` when you want a normal test run, and use `vp test watch` when you want to jump into watch mode.
|
|
19
|
+
:::
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
Put test configuration directly in the `test` block in `vite.config.ts` so all your configuration stays in one place. We do not recommend using `vitest.config.ts` with Vite+.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { defineConfig } from 'vite-plus';
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
test: {
|
|
30
|
+
include: ['src/**/*.test.ts'],
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For the full Vitest configuration reference, see the [Vitest config docs](https://vitest.dev/config/).
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Use this page when something in Vite+ is not behaving the way you expect.
|
|
4
|
+
|
|
5
|
+
::: warning
|
|
6
|
+
Vite+ is still in alpha. We are making frequent changes, adding features quickly, and we want feedback to help make it great.
|
|
7
|
+
:::
|
|
8
|
+
|
|
9
|
+
## Supported Tool Versions
|
|
10
|
+
|
|
11
|
+
Vite+ expects modern upstream tool versions.
|
|
12
|
+
|
|
13
|
+
- Vite 8 or newer
|
|
14
|
+
- Vitest 4.1 or newer
|
|
15
|
+
|
|
16
|
+
If you are migrating an existing project and it still depends on older Vite or Vitest versions, upgrade those first before adopting Vite+.
|
|
17
|
+
|
|
18
|
+
## `vp check` does not run type-aware lint rules or type checks
|
|
19
|
+
|
|
20
|
+
- Confirm that `lint.options.typeAware` and `lint.options.typeCheck` are enabled in `vite.config.ts`
|
|
21
|
+
- Check whether your `tsconfig.json` uses `compilerOptions.baseUrl`
|
|
22
|
+
|
|
23
|
+
The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`, so Vite+ skips `typeAware` and `typeCheck` when that setting is present.
|
|
24
|
+
|
|
25
|
+
## `vp build` does not run my build script
|
|
26
|
+
|
|
27
|
+
Unlike package managers, built-in commands cannot be overwritten. If you are trying to run a `package.json` script use `vp run build` instead.
|
|
28
|
+
|
|
29
|
+
For example:
|
|
30
|
+
|
|
31
|
+
- `vp build` always runs the built-in Vite build
|
|
32
|
+
- `vp test` always runs the built-in Vitest command
|
|
33
|
+
- `vp run build` and `vp run test` run `package.json` scripts instead
|
|
34
|
+
|
|
35
|
+
::: info
|
|
36
|
+
You can also run custom tasks defined in `vite.config.ts` and migrate away from `package.json` scripts entirely.
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
## Staged Checks and Commit Hooks
|
|
40
|
+
|
|
41
|
+
If `vp staged` fails or your pre-commit hook does not run:
|
|
42
|
+
|
|
43
|
+
- make sure `vite.config.ts` contains a `staged` block
|
|
44
|
+
- run `vp config` to install hooks
|
|
45
|
+
- check whether hook installation was skipped intentionally through `VITE_GIT_HOOKS=0`
|
|
46
|
+
|
|
47
|
+
A minimal staged config looks like this:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { defineConfig } from 'vite-plus';
|
|
51
|
+
|
|
52
|
+
export default defineConfig({
|
|
53
|
+
staged: {
|
|
54
|
+
'*': 'vp check --fix',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Asking for Help
|
|
60
|
+
|
|
61
|
+
If you are stuck, please reach out:
|
|
62
|
+
|
|
63
|
+
- [Discord](https://discord.gg/cAnsqHh5PX) for real-time discussion and troubleshooting help
|
|
64
|
+
- [GitHub](https://github.com/voidzero-dev/vite-plus) for issues, discussions, and bug reports
|
|
65
|
+
|
|
66
|
+
When reporting a problem, please include:
|
|
67
|
+
|
|
68
|
+
- The full output of `vp env current` and `vp --version`
|
|
69
|
+
- The package manager used by the project
|
|
70
|
+
- The exact steps needed to reproduce the problem and your `vite.config.ts`
|
|
71
|
+
- A minimal reproduction repository or runnable sandbox
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Upgrading Vite+
|
|
2
|
+
|
|
3
|
+
Use `vp upgrade` to update the global `vp` binary, and use Vite+'s package management commands to update the local `vite-plus` package in a project.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
There are two parts to upgrading Vite+:
|
|
8
|
+
|
|
9
|
+
- The global `vp` command installed on your machine
|
|
10
|
+
- The local `vite-plus` package used by an individual project
|
|
11
|
+
|
|
12
|
+
You can upgrade both of them independently.
|
|
13
|
+
|
|
14
|
+
## Global `vp`
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
vp upgrade
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Local `vite-plus`
|
|
21
|
+
|
|
22
|
+
Update the project dependency with the package manager commands in Vite+:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
vp update vite-plus
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
You can also use `vp add vite-plus@latest` if you want to move the dependency explicitly to the latest version.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Running Binaries
|
|
2
|
+
|
|
3
|
+
Use `vpx`, `vp exec`, and `vp dlx` to run binaries without switching between local installs, downloaded packages, and project-specific tools.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`vpx` executes a command from a local or remote npm package. It can run a package that is already available locally, download a package on demand, or target an explicit package version.
|
|
8
|
+
|
|
9
|
+
Use the other binary commands when you need stricter control:
|
|
10
|
+
|
|
11
|
+
- `vpx` resolves a package binary locally first and can download it when needed
|
|
12
|
+
- `vp exec` runs a binary from the current project's `node_modules/.bin`
|
|
13
|
+
- `vp dlx` runs a package binary without adding it as a dependency
|
|
14
|
+
|
|
15
|
+
## `vpx`
|
|
16
|
+
|
|
17
|
+
Use `vpx` for running any local or remote binary:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
vpx <pkg[@version]> [args...]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Options
|
|
24
|
+
|
|
25
|
+
- `-p, --package <name>` installs one or more packages before running the command
|
|
26
|
+
- `-c, --shell-mode` executes the command inside a shell
|
|
27
|
+
- `-s, --silent` suppresses Vite+ output and only shows the command output
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
vpx eslint .
|
|
33
|
+
vpx create-vue my-app
|
|
34
|
+
vpx typescript@5.5.4 tsc --version
|
|
35
|
+
vpx -p cowsay -c 'echo "hi" | cowsay'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## `vp exec`
|
|
39
|
+
|
|
40
|
+
Use `vp exec` when the binary must come from the current project, for example a binary from a dependency installed in `node_modules/.bin`.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
vp exec <command> [args...]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Examples:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
vp exec eslint .
|
|
50
|
+
vp exec tsc --noEmit
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## `vp dlx`
|
|
54
|
+
|
|
55
|
+
Use `vp dlx` for one-off package execution without adding the package to your project dependencies.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
vp dlx <package> [args...]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
vp dlx create-vite
|
|
65
|
+
vp dlx typescript tsc --version
|
|
66
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Why Vite+?
|
|
2
|
+
|
|
3
|
+
Working in the JavaScript ecosystem today, developers need a runtime such as Node.js, a package manager like pnpm, a dev server, a linter, a formatter, a test runner, a bundler, a task runner, and a growing number of config files.
|
|
4
|
+
|
|
5
|
+
Vite showed that frontend tooling could become dramatically faster by rethinking the architecture instead of accepting the status quo. Vite+ applies that same idea to the rest of the local development workflow, and unifies them all into a single package that speeds up and simplifies development.
|
|
6
|
+
|
|
7
|
+
## The Problem Vite+ is Solving
|
|
8
|
+
|
|
9
|
+
The JavaScript tooling ecosystem has seen its fair share of fragmentation and churn. Web apps keep getting larger, and as a result tooling performance, complexity, and inconsistencies have become real bottlenecks as projects grow.
|
|
10
|
+
|
|
11
|
+
These bottlenecks are amplified in organizations with multiple teams, each using a different tooling stack. Dependency management, build infrastructure, and code quality become fragmented responsibilities, handled team by team and often not owned as a priority by anyone. As a result, dependencies drift out of sync, builds get slower, and code quality declines. Fixing those problems later requires significantly more effort, slows everyone down, and pulls teams away from shipping product.
|
|
12
|
+
|
|
13
|
+
## What's Included in Vite+
|
|
14
|
+
|
|
15
|
+
Vite+ brings the tools needed for modern web development together into a single, integrated toolchain. Instead of assembling and maintaining a custom toolchain, Vite+ provides a consistent entry point that manages the runtime, dependencies, development server, code quality checks, testing, and builds in one place.
|
|
16
|
+
|
|
17
|
+
- **[Vite](https://vite.dev/)** and **[Rolldown](https://rolldown.rs/)** for development and application builds
|
|
18
|
+
- **[Vitest](https://vitest.dev/)** for testing
|
|
19
|
+
- **[Oxlint](https://oxc.rs/docs/guide/usage/linter.html)** and **[Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html)** for linting and formatting
|
|
20
|
+
- **[tsdown](https://tsdown.dev/)** for library builds or standalone executables
|
|
21
|
+
- **[Vite Task](https://github.com/voidzero-dev/vite-task)** for task orchestration
|
|
22
|
+
|
|
23
|
+
In practice, this means developers interact with one consistent workflow: `vp dev`, `vp check`, `vp test`, and `vp build`.
|
|
24
|
+
|
|
25
|
+
This unified toolchain reduces configuration overhead, improves performance, and makes it easier for teams to maintain consistent tooling across projects.
|
|
26
|
+
|
|
27
|
+
## Fast and Scalable by Default
|
|
28
|
+
|
|
29
|
+
Vite+ is built on top of modern tooling such as Vite, Rolldown, Oxc, Vitest, and Vite Task to keep your projects fast and scalable as your codebase grows. By using Rust, we can speed up common tasks by [10× or sometimes even by 100×](https://voidzero.dev/posts/announcing-vite-plus-alpha#performance-scale). However, many Rust-based toolchains are incompatible with existing tools, or aren't extensible using JavaScript.
|
|
30
|
+
|
|
31
|
+
Vite+ bridges Rust to JavaScript via [NAPI-RS](https://napi.rs/) which allows it to provide a familiar, easy-to-configure, and extensible interface in JavaScript with a great ecosystem-compatible developer experience.
|
|
32
|
+
|
|
33
|
+
Unifying the toolchain has performance benefits beyond just using faster tools on their own. For example, many developers set up their linter with "type aware" tools, requiring a full-typecheck to be run during the linting stage. With `vp check` you can format, lint, and type-check your code all in a single pass, speeding up static checks by 2× compared to running type-aware lint rules and type-checks separately.
|
|
34
|
+
|
|
35
|
+
## Fully Open Source
|
|
36
|
+
|
|
37
|
+
Vite+ is fully open source and not a new framework or locked-down platform. Vite+ integrates with the existing Vite ecosystem and the frameworks built on top of it, including React, Vue, Svelte, and others. It can use pnpm, npm, or Yarn, and manages the Node.js runtime for you.
|
|
38
|
+
|
|
39
|
+
We always welcome contributions from the community. See our [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md) to get involved.
|
package/dist/oxfmt-config.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { FormatOptions, SortImportsOptions, TailwindcssOptions } from 'oxfmt';
|
package/dist/oxfmt-config.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|