Files
mr.zero 8cfabc6aa1
ci/woodpecker/push/phaser Pipeline failed
ci/woodpecker/manual/phaser Pipeline failed
Serve the CI pipeline from the update server (marker config)
2026-08-06 07:56:12 +02:00

44 lines
917 B
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -----------------------------------------
# Makefile Phaser (Vite + TypeScript) project builder
# -----------------------------------------
PROJECT = trickster-tiles
DIST_DIR = dist
OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
all: build
node_modules: package.json package-lock.json
npm ci
build: node_modules
@echo "==> Type-checking + bundling (tsc + vite)"
npm run build
web: build
serve: node_modules
@echo "==> Serving production build on http://localhost:4173"
npm run preview
dev: node_modules
npm run dev
export: web
@if [ -z "$(VERSION)" ]; then \
echo "ERROR: VERSION not set!"; exit 1; \
fi
@echo "==> Packaging web build for $(VERSION)"
cd $(DIST_DIR) && zip -r ../$(OUTPUT_ZIP) .
@echo "==> Cleaning temporary files"
rm -rf $(DIST_DIR)
watch:
fswatch -o src | while read; do make build; done
clean:
rm -rf $(DIST_DIR)
.PHONY: all build web serve dev export watch clean