feat(fsharp): Fable browser platform, snake and pong pages, build-web.sh

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-29 01:04:20 +01:00
co-authored by Claude Opus 5.5
parent 527b2cd157
commit a7a4cb5b2a
8 changed files with 177 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/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