Tre scene con aree calpestabili e punti cliccabili ricavati dagli sfondi, tools/prepare_background.py per ridurli a 640x360, il castello del Trebbio che dà indizi in base ai progressi, container nginx sulla porta 8080. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.2 KiB
Makefile
44 lines
1.2 KiB
Makefile
# LA LEGGENDA DEL REGOLO — comandi di sviluppo, verifica e Docker.
|
|
# `make` o `make help` elenca i target.
|
|
|
|
SHELL := /bin/bash
|
|
.DEFAULT_GOAL := help
|
|
|
|
PORT ?= 8000
|
|
DOCKER_PORT ?= 8080
|
|
COMPOSE ?= DOCKER_PORT=$(DOCKER_PORT) docker compose
|
|
|
|
.PHONY: help serve test browser verify up down restart logs ps
|
|
|
|
help: ## Mostra questo aiuto
|
|
@echo "LA LEGGENDA DEL REGOLO — target disponibili:"; echo
|
|
@grep -hE '^[a-zA-Z0-9_-]+:.*?## ' $(MAKEFILE_LIST) | \
|
|
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}'
|
|
|
|
serve: ## Avvia il server statico locale (PORT=8000)
|
|
@echo "→ http://localhost:$(PORT)"
|
|
python3 -m http.server $(PORT) --bind 0.0.0.0
|
|
|
|
test: ## Test della logica, della storia e della soluzione completa
|
|
node --test tests/*.test.mjs
|
|
|
|
browser: ## Partita completa nel browser con Playwright
|
|
node tests/browser.mjs
|
|
|
|
verify: test browser ## Tutti i controlli
|
|
|
|
up: ## Avvia il container (DOCKER_PORT=8080)
|
|
$(COMPOSE) up -d --build
|
|
@echo "→ http://localhost:$(DOCKER_PORT)"
|
|
|
|
down: ## Ferma e rimuove il container
|
|
$(COMPOSE) down
|
|
|
|
restart: down up ## Riavvia il container
|
|
|
|
logs: ## Segue i log del container
|
|
$(COMPOSE) logs -f
|
|
|
|
ps: ## Stato del container
|
|
$(COMPOSE) ps
|