-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (34 loc) · 769 Bytes
/
makefile
File metadata and controls
44 lines (34 loc) · 769 Bytes
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
# Binaries
TAILWIND = ./tailwindcss
GO = go
AIR = air
TEMPL = templ
# Paths
INPUT_CSS = assets/input.css
OUTPUT_CSS = assets/output.css
# Default target
all: build
# Build Tailwind CSS once
css:
$(TAILWIND) -i $(INPUT_CSS) -o $(OUTPUT_CSS)
# Watch Tailwind (auto rebuild on changes)
css-watch:
$(TAILWIND) -i $(INPUT_CSS) -o $(OUTPUT_CSS) --watch
# Generate templ files once
templ-generate:
$(TEMPL) generate
# Watch templ files and regenerate on changes
templ-watch:
$(TEMPL) generate --watch
# Run Go server normally
run:
$(GO) run .
# Run with hot reload (if air is installed)
dev:
# Run tailwind, templ, and air in background
$(MAKE) css-watch & \
$(MAKE) templ-watch & \
$(AIR)
# Clean build artifacts
clean:
rm -f $(OUTPUT_CSS)