Skip to content

Commit 92cbf78

Browse files
wan9chiclaude
andcommitted
revert: restore crates/vite_task/docs to main
The docs edits in this PR (task-cache.md, terminologies.md) are not necessary for the task command shorthand feature; reverting to keep the PR scope tight. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 19027aa commit 92cbf78

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

crates/vite_task/docs/task-cache.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,13 +550,13 @@ Ensure commands produce identical outputs for identical inputs:
550550

551551
```json
552552
{
553-
"tasks": {
554-
"build": ["tsc", "rollup -c", "terser dist/bundle.js"]
553+
"scripts": {
554+
"build": "tsc && rollup -c && terser dist/bundle.js"
555555
}
556556
}
557557
```
558558

559-
Each `&&` separated command is cached independently. Task command arrays use the same granular caching semantics. If only terser config changes, TypeScript and rollup will hit cache.
559+
Each `&&` separated command is cached independently. If only terser config changes, TypeScript and rollup will hit cache.
560560

561561
## Implementation Reference
562562

crates/vite_task/docs/terminologies.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,19 @@
1616
// vite-task.json
1717
{
1818
"tasks": {
19-
"lint": "echo lint",
20-
"check": ["eslint .", "tsc --noEmit", "prettier --check ."],
21-
},
19+
"lint": {
20+
"command": "echo lint"
21+
}
2222
}
2323
```
2424
25-
In the example above, `build`, `lint`, and `check` are **task group names**. A task group may define one task, or multiple tasks separated by `&&`.
26-
27-
In `tasks`, command-only task groups can be written as a string or as an array. Object form with `command` and options is also supported.
25+
In the example above, `build` and `lint` are **task group names**. A task group may define one task, or multiple tasks separated by `&&`.
2826
29-
The three task groups generate these tasks:
27+
The two task groups generates 3 tasks:
3028
3129
- `app#build(subcommand 0)` (runs `echo build1`)
3230
- `app#build` (runs `echo build2`)
3331
- `app#lint` (runs `echo lint`)
34-
- `app#check(subcommand 0)` (runs `eslint .`)
35-
- `app#check(subcommand 1)` (runs `tsc --noEmit`)
36-
- `app#check` (runs `prettier --check .`)
3732
3833
These are **task names**. They are for displaying and filtering.
3934

0 commit comments

Comments
 (0)