.PHONY: help serve size validate tidy ascii clean help: ## Show this help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}' serve: ## Start a local static server on :8000 @command -v python3 >/dev/null 2>&1 && \ python3 -m http.server 8000 || \ (command -v npx >/dev/null 2>&1 && npx --yes http-server -p 8000) || \ echo "Install python3 or node to serve locally." size: ## Report file sizes @echo "HTML:" @find . -maxdepth 2 -name "*.html" -printf " %-30p %s bytes\n" @echo @echo "CSS:" @find static/css -name "*.css" -printf " %-30p %s bytes\n" @echo @echo "Images (svg):" @find static/img -name "*.svg" -printf " %-30p %s bytes\n" validate: ## Quick HTML sanity check (counts opening vs closing tags) @for f in *.html; do \ open=$(grep -oE '<[a-zA-Z][a-zA-Z0-9-]*' "$$f" | grep -vE '^<(br|hr|img|input|meta|link|source|area|base|col|embed|param|track|wbr|!--)' | sed 's/^ static/ascii/rain.txt @echo "Regenerated static/ascii/rain.txt (from static/img/og-image-bg.svg)" clean: ## Remove build artefacts @rm -rf bin/ node_modules/ dist/