-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 969 Bytes
/
Makefile
File metadata and controls
45 lines (34 loc) · 969 Bytes
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
.DEFAULT_GOAL := help
SHELL := /bin/bash
.SHELLFLAGS := -euo pipefail -c
# --- Setup ---
.PHONY: setup
setup: ## Install pre-commit hooks and run all checks
pre-commit install
pre-commit install --hook-type commit-msg
pre-commit run --all-files
@echo ""
@echo "Setup complete."
.PHONY: update-hooks
update-hooks: ## Update pre-commit hooks to latest versions
pre-commit autoupdate
# --- Quality ---
.PHONY: pre-commit
pre-commit: ## Run all pre-commit hooks on all files
pre-commit run --all-files
.PHONY: build
build: ## Build the Astro site
pnpm build
.PHONY: dev
dev: ## Start the dev server
pnpm dev
.PHONY: check-links
check-links: ## Check for broken links
npx lychee --no-progress --exclude-mail \
"src/**/*.md" "src/**/*.astro"
# --- Help ---
.PHONY: help
help: ## Show available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'