-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (49 loc) Β· 1.67 KB
/
Makefile
File metadata and controls
59 lines (49 loc) Β· 1.67 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
.PHONY: all build build-backend build-web install-web clean clean-web run dev help
all: build
help:
@echo "Leanpoint Monorepo Build System"
@echo ""
@echo "Available targets:"
@echo " make build - Build both backend and frontend"
@echo " make build-backend - Build only the Zig backend"
@echo " make build-web - Build only the frontend"
@echo " make install-web - Install frontend dependencies"
@echo " make dev - Run frontend dev server (hot reload)"
@echo " make run - Run the backend"
@echo " make clean - Clean all build artifacts"
@echo " make clean-web - Clean only frontend artifacts"
@echo ""
# Install frontend dependencies
install-web:
@echo "π¦ Installing frontend dependencies..."
cd web && npm install
# Build frontend (production)
build-web: install-web
@echo "π¨ Building frontend..."
cd web && npm run build
@echo "β
Frontend built successfully to ./web-dist/"
# Build backend
build-backend:
@echo "β‘ Building Zig backend..."
zig build
@echo "β
Backend built successfully to ./zig-out/bin/leanpoint"
# Build everything
build: build-backend build-web
@echo "β
All components built successfully!"
# Run frontend dev server
dev:
@echo "π Starting frontend dev server..."
cd web && npm run dev
# Run backend
run:
@echo "π Running leanpoint..."
./zig-out/bin/leanpoint --upstreams-config upstreams.json --static-dir web-dist
# Clean frontend artifacts
clean-web:
@echo "π§Ή Cleaning frontend artifacts..."
rm -rf web/node_modules web-dist
# Clean all artifacts
clean: clean-web
@echo "π§Ή Cleaning backend artifacts..."
rm -rf zig-out zig-cache
@echo "β
All artifacts cleaned!"