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
@@ -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% 還原各個郵件用戶端的渲染差異,僅供參考,請以實際效果為準。
|
||||
|
||||
### 整合測試
|
||||
|
||||
|
||||
Reference in new issue
Block a user