#!/usr/bin/env bash # Usage: ./build-web.sh # Compiles src/ + web/ to JavaScript with Fable (a local dotnet tool, see .config/dotnet-tools.json) into web/dist/. # index.html loads the Snake entry module, pong.html the Pong one. # Then serve the repo root (node scripts/serve.mjs) and open http://localhost:8000/fsharp/index.html. set -euo pipefail cd "$(dirname "$0")" export PATH="$HOME/.dotnet:$PATH" export DOTNET_NOLOGO=1 DOTNET_CLI_TELEMETRY_OPTOUT=1 dotnet tool restore dotnet fable web -o web/dist --noCache