vibe-coded serve program that automatically rebuilds

This commit is contained in:
2025-08-10 18:07:54 -07:00
parent 66b1b5c2ae
commit 5e040ae4f6
4 changed files with 222 additions and 4 deletions

View File

@@ -22,10 +22,8 @@ $(OUT_DIR)/index.stamp: $(PAGES) $(TEMPLATES) $(ASSETS_FILES) cmd/build/main.go
@if [ -d $(ASSETS_DIR) ]; then rm -rf $(OUT_DIR)/$(ASSETS_DIR); cp -r $(ASSETS_DIR) $(OUT_DIR)/; fi
@date +%s > $(OUT_DIR)/index.stamp
serve: build
@echo "Serving $(OUT_DIR) as document root..."
@xdg-open "http://localhost:8000/index.html" || true
@cd $(OUT_DIR) && python -m http.server
serve: deps
@$(GO) run ./cmd/serve --port 8000 $(PWD)
PDF := $(OUT_DIR)/output.pdf
PDF_2UP := $(OUT_DIR)/output-2up.pdf