-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (41 loc) · 1.81 KB
/
Makefile
File metadata and controls
59 lines (41 loc) · 1.81 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
# ─────────────────────────────────────────────
# Retrieve Countries — Makefile
# ─────────────────────────────────────────────
.DEFAULT_GOAL := help
APP := retrieve-countries
DC_PROD := docker compose -f docker-compose.yml
DC_DEV := docker compose -f docker-compose.dev.yml
.PHONY: dev prod down logs build test lint lint-fix format format-fix typecheck ci install clean help
# ── Docker ───────────────────────────────────
dev: ## Start dev containers (hot-reload)
$(DC_DEV) up --build
prod: ## Start production containers
$(DC_PROD) up -d --build
down: ## Stop all containers
@$(DC_DEV) down 2>/dev/null || true
@$(DC_PROD) down -v 2>/dev/null || true
logs: ## Tail container logs
@docker compose logs -f
# ── Local ────────────────────────────────────
install: ## Install dependencies
npm ci
build: ## Compile TypeScript
npm run build
test: ## Run tests
npm test
lint: ## Run ESLint
npm run lint
lint-fix: ## Run ESLint with auto-fix
npm run lint:fix
format: ## Check code formatting (Prettier)
npm run format:check
format-fix: ## Fix code formatting (Prettier)
npm run format
typecheck: ## Type-check without emitting (tsc --noEmit)
npm run typecheck
ci: lint format typecheck test build ## Run full CI checks locally
clean: ## Remove build artifacts and caches
rm -rf dist coverage node_modules/.cache
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'