-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplz.toml
More file actions
123 lines (97 loc) · 2.99 KB
/
plz.toml
File metadata and controls
123 lines (97 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Install all dependencies
[tasks.setup]
run = "pnpm install && pnpm exec playwright install chromium && cargo install wasm-pack && uv sync"
# Run all tests
[tasks.test]
run = "pnpm exec vitest run"
git_hook = "pre-commit"
# Check formatting
[tasks.format]
run = "pnpm exec prettier --check ."
git_hook = "pre-commit"
fail_hook = { suggest_command = "plz fix" }
# Type-check
[tasks.typecheck]
run = "pnpm exec vue-tsc --noEmit -p cfasim-ui/charts/tsconfig.json && pnpm exec vue-tsc --noEmit -p cfasim-ui/components/tsconfig.json"
git_hook = "pre-commit"
# Auto-fix formatting
[tasks.fix]
run = "pnpm exec prettier --write ."
# Initialize a new cfasim project
[tasks.init]
run = "cargo run -p cfasim -- init"
# Build cfasim-ui libraries (components + charts)
[tasks.build]
run = "pnpm --filter @cfasim-ui/components --filter @cfasim-ui/charts run build"
# Check bundle sizes for built packages
[tasks.bundle-size]
depends = ["build"]
run = "node scripts/check-bundle-size.mjs"
git_hook = "pre-push"
# Bump all package versions (patch, minor, or major)
[tasks.version]
run = "node scripts/version.mjs ${1}"
[taskgroup.publish.pnpm]
depends = ["build"]
run = "pnpm -r publish --access public"
[taskgroup.publish.cargo]
run = "cargo publish -p cfasim-model && cargo publish -p cfasim"
[taskgroup.cli.extends]
dir = "cfasim"
# Format Rust code
[taskgroup.cli.format]
run = "cargo fmt --check"
git_hook = "pre-commit"
fail_hook = { suggest_command = "plz cli fix" }
# Auto-fix Rust formatting
[taskgroup.cli.fix]
run = "cargo fmt"
# Run Rust tests
[taskgroup.cli.test]
run = "cargo test"
# Lint Rust code
[taskgroup.cli.lint]
run = "cargo clippy -- -D warnings"
# Integration tests for the CLI (scaffolds projects + Playwright)
[taskgroup.cli.e2e]
run = "pnpm exec playwright test --config playwright.config.ts"
[taskgroup.models.extends]
dir = "models"
# Run the models dev server
[taskgroup.models.dev]
depends = ["build"]
run = "pnpm dev"
# Build the models app
[taskgroup.models.build]
depends = ["build"]
run = "pnpm exec vite build"
# E2E tests for models
[taskgroup.models.test]
depends = ["build"]
run = "pnpm exec playwright test --config playwright.config.ts"
git_hook = "pre-push"
[taskgroup.docs.extends]
dir = "docs"
# Generate the component and API documentation for the docs site
[taskgroup.docs.generate]
dir = "."
run = "node scripts/generate_docs.mjs"
# Build the static demos embedded in docs
[taskgroup.docs.demos]
run = """
pnpm exec vite build --config demos/sidebar-layout/vite.config.ts && \
pnpm exec vite build --config demos/sidebar-tabs/vite.config.ts
"""
# Serve docs locally
[taskgroup.docs.dev]
depends = ["build", "docs.generate", "docs.demos"]
run = "pnpm exec vitepress dev"
# Build static files for docs
[taskgroup.docs.build]
depends = ["build", "docs.generate", "docs.demos"]
run = "pnpm exec vitepress build"
# Run tests for docs (Playwright tests for docs site)
[taskgroup.docs.test]
depends = ["build", "docs.generate"]
run = "pnpm exec playwright test --config playwright.config.ts"
git_hook = "pre-push"