-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (57 loc) · 2.13 KB
/
Copy pathMakefile
File metadata and controls
79 lines (57 loc) · 2.13 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
APP_NAME := homelab-stackdoc
PNPM := pnpm
COMPOSE := docker compose
help: ## Show this help
@echo ""
@echo " $(APP_NAME) — available commands"
@echo " ─────────────────────────────────────────"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo ""
# ==========================================
# Infra (local)
# ==========================================
infra: ## Start local services (Postgres, etc.)
$(COMPOSE) up -d --force-recreate
infra-down: ## Stop local services
$(COMPOSE) down -v
infra-logs: ## Tail local service logs
$(COMPOSE) logs -f
# ==========================================
# CI/CD & Deployment
# ==========================================
install: ## Install all dependencies
$(PNPM) install
build-packages:
$(PNPM) --filter "./packages/**" run build
build: build-packages
$(PNPM) --filter "./apps/**" run build
typecheck: build-packages
$(PNPM) --recursive --if-present run typecheck
test:
pnpm --recursive --if-present run test
clean:
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name "dist" -type d -prune -exec rm -rf '{}' +
# ==========================================
# Local Development
# ==========================================
dev: build-packages
$(PNPM) --filter "./apps/**" --parallel run dev
dev-api: build-packages ## Start the api server
$(PNPM) --filter "@homelab-stackdoc/api" run dev
dev-web: build-packages ## Start the web server
$(PNPM) --filter "./apps/web" run dev
# ==========================================
# Linting && Formatting
# ==========================================
lint: ## Run ESLint
$(PNPM) run lint
lint-fix: ## Run ESLint with auto-fix
$(PNPM) run lint:fix
format: ## Format all files with Prettier
$(PNPM) run format
format-check: ## Check formatting without writing
$(PNPM) run format:check
.PHONY: help install dev build preview clean typecheck lint docker-build docker-run \
core-typecheck renderer-typecheck web-typecheck api-typecheck new-lockfile