From 34e6e73016c38722a42c04f90ab06872ab761539 Mon Sep 17 00:00:00 2001 From: cabinw Date: Mon, 14 Sep 2026 18:33:05 +0800 Subject: [PATCH] docs: hand-off instructions for publishing the phone bundle Written to be copied whole into another agent's prompt, so it names the two failure modes that are silent rather than loud: a bundle published without --standalone has no viewport meta and renders at 980px on a phone, and a host serving .js as application/octet-stream leaves a blank page with no clue in the UI. The acceptance list checks the icons and the tile sheet explicitly, because a missing asset degrades to the fallback renderer and looks deliberate. Co-Authored-By: Claude Opus 5 --- docs/publish-phone.md | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/publish-phone.md diff --git a/docs/publish-phone.md b/docs/publish-phone.md new file mode 100644 index 0000000..397fead --- /dev/null +++ b/docs/publish-phone.md @@ -0,0 +1,69 @@ +# 发布手机版 · 交给 agent 执行的说明 + +整份内容可以直接复制给另一个 agent。 + +--- + +**任务:把 HEX TRAILS 的 50 关手机版发布到一个手机能访问的网址。** + +仓库:`git@git.zeroplus.fun:Zeroplus/HexTrails.git`,分支 `main`(本地路径 `/Users/wukaibing/Codex/hex-arrow`)。构建脚本 `scripts/build-phone.mjs` 已经写好并测过,你**不需要改游戏代码**。 + +## 第一步,构建 + +```bash +node scripts/build-phone.mjs --standalone --out=build/phone-standalone +``` + +产物约 5.2MB:`index.html`(完整 HTML 文档,样式已内联)+ `src/` 22 个 ES module + `assets/` 7 个资源(贴图、图标图集、背景、托盘、两个 woff2 字体)。 + +如果目标托管平台**自带 `` / `` / `` 外壳**(比如 Claude Artifacts),改用不带 `--standalone` 的默认模式,产出的 `index.html` 只有 body 内容: + +```bash +node scripts/build-phone.mjs +``` + +两种模式只差文档外壳,其余完全一样。**别把两者搞混**——给普通静态托管发了片段版,页面会没有 viewport meta,手机上按 980px 宽渲染。 + +## 第二步,发布 + +发到任意静态托管都行(Vercel / Netlify / Cloudflare Pages / GitHub Pages / 对象存储)。要求只有三条: + +1. **保持目录结构。** `index.html` 里是 `