-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (40 loc) Β· 1.57 KB
/
Makefile
File metadata and controls
56 lines (40 loc) Β· 1.57 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
# Using uv for Python 3.13 and bun for Next.js 16
PYTHON_RUN := uv run
BUN_RUN := bun
PREK := $(PYTHON_RUN) prek
# --- Colors ---
BLUE := \033[34m
GREEN := \033[32m
NC := \033[0m
# CRITICAL: PHONY ensures 'make lint' runs the script, not looks for a 'lint' folder
.PHONY: help install dev build lint prek prek-update prek-manual clean build-games build-pacman
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install dependencies (uv + bun)
uv sync
$(BUN_RUN) install
dev: ## Start Next.js dev server
$(BUN_RUN) dev
build: ## Build Next.js app
$(BUN_RUN) build
lint: ## Run eslint (Checks TS/JS)
$(BUN_RUN) lint
# --- Prek Targets ---
prek: ## Run all prek hooks
$(PREK) run --all-files
prek-manual: ## Run prek with an alternative config file (e.g. prek.local.toml)
@echo "$(BLUE)Running prek with custom config...$(NC)"
$(PREK) --config .pre-commit-config.yaml run --all-files --hook-stage manual
prek-update: ## Autoupdate prek hooks and refresh uv lock
@echo "$(BLUE)Updating prek and hooks...$(NC)"
$(PREK) autoupdate
# --- Games ---
build-pacman: ## Build Pac-Man game standalone (optional, for Vite dev)
@echo "$(BLUE)Building Pac-Man game (standalone)...$(NC)"
cd games/pacman && npm install && npm run build
@echo "$(GREEN)Pac-Man build complete.$(NC)"
build-games: build-pacman ## Build all games
# --- Maintenance ---
clean: ## Clean build artifacts
rm -rf .next out node_modules .venv
@echo "$(GREEN)Cleanup complete.$(NC)"