MRPGI/web/build.sh
type-two e9cf00e686 THE MRPGI BOOK: deep combined user/dev manual, linked from the live menus
- web/manual.html — 17 chapters: playing, the editor deeply, the
  authoring cookbook (full JSON reference + the five load-bearing
  puzzle patterns), dialogue trees, flags, the art pipeline with
  sprite-generation prompts, sound, driving the engine with code
  (real JSONL transcripts), AIs + MCP, prompt patterns with actual
  outputs (the roof room is the real shipped expansion), the web
  build & cloud saves, engine internals, extension recipes,
  troubleshooting, and full command/event/palette reference.
- Game menu gains "Manual": window.open on the web (via a JS plugin
  import), the default browser natively.
- README tab links the Book; repo README points at it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 11:49:24 +10:00

18 lines
878 B
Bash
Executable File

#!/bin/sh
# Build the browser version of MRPGI into web/dist/ (self-contained, static).
# Requires the wasm target: rustup target add wasm32-unknown-unknown
#
# Deploy (live at https://monsterrobot.games/engine/):
# scp web/dist/* root@100.94.195.115:/opt/dealgod/images/engine/
# Served by the dealgod-nginx container via a `location /engine/` alias in
# /opt/dealgod/nginx/dealgod-servers.conf. NOTE: edit that file IN PLACE
# (python open("w") / tee), never `sed -i` — it's a single-file bind mount
# and an inode swap desyncs the container until a `docker restart`.
set -e
cd "$(dirname "$0")/.."
cargo build -p mrpgi --release --target wasm32-unknown-unknown
mkdir -p web/dist
cp target/wasm32-unknown-unknown/release/mrpgi.wasm web/dist/
cp web/index.html web/manual.html web/mq_js_bundle.js web/dist/
echo "web build ready: $(du -sh web/dist | cut -f1) in web/dist/"