-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
48 lines (40 loc) · 1.84 KB
/
Taskfile.yml
File metadata and controls
48 lines (40 loc) · 1.84 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
version: "3"
tasks:
fmt:
desc: Format JSON files (pass paths/globs via CLI_ARGS).
cmds:
- go run scripts/format/main.go {{.CLI_ARGS}}
gen:
desc: Generate a single theme from a palette (PAL=palettes/<name>.json).
cmds:
- test -n "{{.PAL}}"
- go run ./scripts/generate --palette "{{.PAL}}"
gen-all:
desc: Generate all themes into generated/themes.
cmds:
- for p in palettes/*.json; do base=$(basename "$p" .json); if [ "$base" != "alpha" ]; then go run ./scripts/generate --palette "$p"; fi; done
- go run scripts/format/main.go generated/themes/*.json
sync:
desc: Sync a palette against its reference theme (THEME=<name>).
cmds:
- test -n "{{.THEME}}"
- scripts/sync.sh "{{.THEME}}"
sync-all:
desc: Sync all palettes against their reference themes.
cmds:
- for p in palettes/*.json; do base=$(basename "$p" .json); if [ "$base" != "alpha" ] && [ -f "themes/$base.json" ]; then scripts/sync.sh "$base"; fi; done
extract:
desc: Extract a palette from a reference theme (THEME=<name>).
cmds:
- test -n "{{.THEME}}"
- go run scripts/palette/main.go --theme "themes/{{.THEME}}.json" --style-keys syntax,players --with-alpha
publish:
desc: Generate non-WIP themes into ./themes for publishing.
cmds:
- mkdir -p themes
- for p in palettes/*.json; do base=$(basename "$p" .json); if [ "$base" != "alpha" ]; then go run ./scripts/generate --palette "$p" --wip=false --out "themes/${base}.json"; fi; done
- go run scripts/format/main.go themes/*.json
verify:
desc: Verify generated themes match reference themes.
cmds:
- for p in palettes/*.json; do base=$(basename "$p" .json); if [ "$base" != "alpha" ] && [ -f "themes/$base.json" ]; then go run ./scripts/generate --palette "$p" --compare "themes/$base.json"; fi; done