refactor(preview): remove juice/Node.js, simplify to pure Go dev server with SSE

- Delete tools/server/ (Node.js, juice, inliner.mjs, server.mjs, node_modules)
- Create tools/preview/server.go — pure Go dev server with SSE + file polling
- Rewrite tools/cli/dev.go — start Go server in-process, no Node.js required
- Simplify preview/index.html — View dropdown (Modern/Source), remove Client
  Simulation panel, remove Gmail/Outlook logic, WebSocket → SSE
- Update all 14 documentation files (README, CONTRIBUTING, AGENTS + translations)
  to reflect pure Go dev server and simplified preview

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
KenanZhuandClaude committed 2026-06-23 09:48:04 +08:00
1 parent d4c6eb99af
commit 0ad7db124a
20 files changed
+319 -633

No files matched your search

+1 -6
View File
@@ -35,17 +35,14 @@
## 开发环境
- **Go 1.21+** 用于模板渲染和 CLI 工具
- **Node.js 18+**(可选)用于实时开发服务器与 Juice CSS 内联
### 本地预览(静态)
1. 先生成预览数据:`cd tools && go run . preview all`
2. 在浏览器中打开 `preview/index.html` — 无需服务器
> [!WARNING]
> 静态 Gmail/Outlook 模拟仅供参考,使用 dev 模式可获得相对准确的 CSS 内联渲染。
### 开发服务器(实时重载 + CSS 内联 + 客户端模拟)
### 开发服务器(实时重载)
```bash
cd tools && go run . dev
@@ -54,8 +51,6 @@ cd tools && go run . dev
修改 `.tmpl` 文件后自动重建并推送至浏览器。
> [!NOTE]
> Dev 模拟无法 100% 还原各个邮件客户端的渲染差异,仅供参考,请以实际效果为准。
### 集成测试