Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (41 loc) · 1.76 KB
/
Copy pathMakefile
File metadata and controls
61 lines (41 loc) · 1.76 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
.PHONY: install install-hooks dev test lint config.check help \
backend.install backend.dev backend.test backend.lint backend.db backend.db.stop \
frontend.install frontend.dev frontend.test frontend.lint frontend.check
help: ## Show this help
@grep -E '^[a-zA-Z_.-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-22s %s\n", $$1, $$2}'
install: backend.install frontend.install ## Install both apps
install-hooks: ## Install root git hooks and backend pre-commit environments
git config core.hooksPath .githooks
$(MAKE) -C backend install-hooks
dev: ## Start backend + frontend in parallel (Ctrl-C kills both)
@$(MAKE) -j2 backend.dev frontend.dev
test: ## Run backend and frontend tests in parallel
@$(MAKE) -j2 backend.test frontend.test
lint: ## Lint both apps in parallel
@$(MAKE) -j2 backend.lint frontend.lint
config.check: ## Validate the public operational configuration contract
@python3 scripts/check-operational-config.py
# ---------- backend (delegates to backend/Makefile) ----------
backend.install: ## Install backend deps
$(MAKE) -C backend setup
backend.dev: ## Start backend dev server
$(MAKE) -C backend dev
backend.test: ## Run backend tests
$(MAKE) -C backend test
backend.lint: ## Lint backend
$(MAKE) -C backend lint
backend.db: ## Start postgres
$(MAKE) -C backend db
backend.db.stop: ## Stop postgres
$(MAKE) -C backend db-stop
# ---------- frontend ----------
frontend.install: ## Install frontend deps
cd frontend && bun install
frontend.dev: ## Start frontend dev server
cd frontend && bun run dev
frontend.test: ## Run frontend tests
cd frontend && bun run test
frontend.lint: ## Lint frontend
cd frontend && bun run lint:ci
frontend.check: ## Type-check frontend
cd frontend && bun run check