Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
121 lines (105 loc) · 3.3 KB
/
Copy pathTaskfile.yml
File metadata and controls
121 lines (105 loc) · 3.3 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
version: "3"
tasks:
# Development Tools
templ:
desc: Run templ with integrated server and hot reload
cmds:
- go tool templ generate --watch --proxy="http://localhost:8090" --cmd="go run ./cmd/docs/main.go" --open-browser=false
shiki-highlighter:
desc: Start shiki syntax highlighter service
dir: shiki
cmds:
- npm start
tailwind-clean:
desc: Clean tailwind output
cmds:
- "tailwindcss -i ./assets/css/input.css -o ./assets/css/output.css --clean"
tailwind-watch:
desc: Run tailwindcss in watch mode
cmds:
- "tailwindcss -i ./assets/css/input.css -o ./assets/css/output.css --watch"
minify-js-components:
desc: Minify and watch JavaScript component files
cmds:
- |
npx esbuild \
components/avatar/avatar.js \
components/calendar/calendar.js \
components/carousel/carousel.js \
components/checkbox/checkbox.js \
components/chart/chart.js \
components/collapsible/collapsible.js \
components/copybutton/copybutton.js \
components/datepicker/datepicker.js \
components/dialog/dialog.js \
components/dropdown/dropdown.js \
components/input/input.js \
components/inputotp/inputotp.js \
components/label/label.js \
components/popover/popover.js \
components/progress/progress.js \
components/rating/rating.js \
components/selectbox/selectbox.js \
components/sidebar/sidebar.js \
components/slider/slider.js \
components/tabs/tabs.js \
components/tagsinput/tagsinput.js \
components/textarea/textarea.js \
components/timepicker/timepicker.js \
components/toast/toast.js \
--minify \
--watch \
--bundle \
--outdir=components \
--out-extension:.js=.min.js
dev:
desc: Start development server with hot reload
deps:
- tailwind-clean
cmds:
- task --parallel tailwind-watch templ shiki-highlighter minify-js-components
# Build & Validation
templ-generate:
desc: Compile templ files into Go
cmds:
- go tool templ generate
render-showcases:
desc: Render showcase components into out/showcase/
cmds:
- go run ./cmd/render-showcases
build-html:
desc: Build static showcase HTML
cmds:
- task: templ-generate
- task: render-showcases
- echo "✅ Static showcase HTML rendered to ./out"
lint-html:
desc: Lint HTML output using ESLint
cmds:
- npx eslint --fix "out/**/*.html" --ext .html
validate-html:
desc: Run full pipeline (build + lint)
cmds:
- task: build-html
- task: lint-html
# Generators
generate-sitemap:
desc: Generate sitemap.xml
cmds:
- go run ./cmd/sitemap/main.go --baseurl="https://templui.io" --routes="./cmd/docs/main.go" --output="./static/sitemap.xml"
generate-icons:
desc: Generate icon definitions
cmds:
- go run cmd/icongen/main.go
generate-llms:
desc: Generate llms.txt from registry.json
cmds:
- go run cmd/generate-llms/main.go
install-compinstall:
desc: Install compinstall tool
cmds:
- go install ./cmd/compinstall
install-templui:
desc: Install templui CLI from the current local checkout
cmds:
- go install ./cmd/templui