-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 779 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (29 loc) · 779 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
.PHONY: help build run stop clean dev generate
# Build the application
build: templ
go build -o bin/app cmd/web/main.go
# Development mode with hot reload
dev:
@echo "Starting development server..."
@air -c .air.toml || go run cmd/web/main.go
# Generate templ files
templ:
@echo "Generating templ files..."
@templ generate --watch --proxy="http://localhost:8080"
# download tailwind
tw:
@echo "download tailwind"
@chmod +x ./dev/scripts/download-tailwind.sh
./dev/scripts/download-tailwind.sh
# Run the application
run: build
./bin/app
# Clean build artifacts
clean:
rm -rf bin/
find . -name "*_templ.go" -delete
# Stop the application
stop:
@echo "Stopping application..."
@pkill -f "go run cmd/main.go" || true
@pkill -f "templ generate --watch" || true