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:
1 parent
d4c6eb99af
commit
0ad7db124a
20 files changed
+319
-633
No files matched your search
+2
-11
@@ -62,26 +62,17 @@ cd tools && go run . preview all
|
||||
```
|
||||
然后打开 `preview/index.html`。
|
||||
|
||||
> [!WARNING]
|
||||
> 静态模式下 Gmail/Outlook 模拟仅供参考,使用 dev 模式可获得相对准确的 CSS 内联渲染。
|
||||
|
||||
**开发服务器(实时重载 + Juice CSS 内联 + Gmail/Outlook 模拟):**
|
||||
**开发服务器(实时重载):**
|
||||
```bash
|
||||
cd tools && go run . dev # 需要 Node.js
|
||||
cd tools && go run . dev
|
||||
# → http://localhost:3456
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Dev 模拟无法 100% 还原各个邮件客户端的渲染差异,仅供参考,请以实际效果为准。
|
||||
|
||||
| 功能 | 静态 | Dev |
|
||||
|-----------|--------|-----|
|
||||
| Go 模板渲染 | ✅ | ✅ |
|
||||
| 主题/模板切换 | ✅ | ✅ |
|
||||
| Juice CSS 内联 | — | ✅ |
|
||||
| Gmail/Outlook CSS 剥离 | — | ✅ |
|
||||
| 实时重载 | — | ✅ |
|
||||
| 需要 Node.js | — | ✅ |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user