2026-05-24 18:13:22 +08:00
|
|
|
import { defineConfig } from "vite-plus";
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
staged: {
|
|
|
|
|
"*": "vp check --fix",
|
|
|
|
|
},
|
|
|
|
|
fmt: {},
|
2026-05-29 00:58:14 +08:00
|
|
|
lint: { options: { typeAware: true, typeCheck: false } },
|
2026-05-24 18:13:22 +08:00
|
|
|
run: {
|
2026-05-29 11:12:12 +08:00
|
|
|
cache: false,
|
|
|
|
|
// `ci` is the parallel verification graph used by .github/workflows/ci.yml.
|
|
|
|
|
// The task runner fans out independent branches concurrently; the wall-clock
|
|
|
|
|
// critical path is build -> test:pty. fmt and lint have no build dependency,
|
|
|
|
|
// so they run immediately alongside build. check:type and the test suites
|
|
|
|
|
// need the built dist (@vue-tui/runtime exposes no "types" export — its
|
|
|
|
|
// consumers resolve types and runtime from dist/*.d.mts), so they depend on
|
|
|
|
|
// build. The serial `ready` script in package.json stays for simple local use.
|
|
|
|
|
tasks: {
|
|
|
|
|
"ci:build": { command: "vp run build" },
|
|
|
|
|
"ci:fmt": { command: "vp run check:fmt" },
|
|
|
|
|
"ci:lint": { command: "vp run check:lint" },
|
|
|
|
|
"ci:type": { command: "vp run check:type", dependsOn: ["ci:build"] },
|
|
|
|
|
"ci:test:integration": {
|
|
|
|
|
command: "vp run -r test:integration",
|
|
|
|
|
dependsOn: ["ci:build"],
|
|
|
|
|
},
|
|
|
|
|
"ci:test:pty": { command: "vp run -r test:pty", dependsOn: ["ci:build"] },
|
|
|
|
|
ci: {
|
|
|
|
|
command: "echo ci ok",
|
|
|
|
|
dependsOn: ["ci:fmt", "ci:lint", "ci:type", "ci:test:integration", "ci:test:pty"],
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-05-24 18:13:22 +08:00
|
|
|
},
|
|
|
|
|
});
|