-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
53 lines (40 loc) · 1.36 KB
/
Makefile
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
# Dev Tools
templ:
templ generate --watch --proxy="http://localhost:8090" --open-browser=false -v
server:
air \
--build.cmd "go build -o tmp/bin/main ./cmd/server" \
--build.bin "tmp/bin/main" \
--build.delay "100" \
--build.exclude_dir "node_modules" \
--build.include_ext "go" \
--build.stop_on_error "false" \
--misc.clean_on_exit true
tailwind-clean:
tailwindcss -i ./assets/css/input.css -o ./assets/css/output.css --clean
tailwind-watch:
tailwindcss -i ./assets/css/input.css -o ./assets/css/output.css --watch
dev:
make tailwind-clean
make -j3 templ server tailwind-watch
debug:
make -j3 templ tailwind-app tailwind
generate-sitemap:
go run ./cmd/sitemap/main.go --baseurl="https://templui.io" --routes="./cmd/server/main.go" --output="./static/sitemap.xml" --robots="./static/robots.txt"
generate-icons:
go run cmd/icongen/main.go
# Validate generated HTML files against Eslint plugins
# Step 1: Compile templ files into Go
templ-generate:
templ generate
# Step 2: Render showcase components into out/showcase/
render-showcases:
go run ./cmd/render-showcases
# Step 3: Combined task
build-html: templ-generate render-showcases
@echo "✅ Static showcase HTML rendered to ./out"
# Step 4: Lint HTML output using ESLint
lint-html:
npx eslint "out/**/*.html" --ext .html
# Step 6: Run full pipeline (build + lint)
validate-html: build-html lint-html