Files
MailUI4Agents/.gitignore
JianFeeeee c73dd10f9c build: 保留 go:embed 占位页,新克隆无需 node 即可编译
go:embed 要求目标目录存在才能编译,而构建产物不进版本库 ——
上一版把整个 gateway/internal/static/static/ 忽略掉,导致新克隆连
go build ./cmd/server 都跑不起来(pattern static: no matching files found),
只改后端的人被迫先装 node。

改为忽略目录内容但保留一个占位 index.html:说明前端未构建、给出构建命令,
并明确后端 API 仍然可用。真实产物由 install.sh 覆盖后嵌入。
2026-09-02 10:32:41 +08:00

54 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ---- 依赖与构建产物 ----
#
# 前端只在**构建期**用到 npm`npm run build` 出的 dist/ 被 cp 进
# gateway/internal/static/static/ 再由 go:embed 编进二进制。
# 部署机上没有 node产物就是「一个二进制 + 一个 .db 文件」。
# 因此这三样都不进版本库:装依赖与构建都能从 package-lock.json 复现。
web/node_modules/
web/dist/
plugins/*/node_modules/
# go:embed 的输入目录 = web/dist 的副本,同属构建产物。
#
# 但目录本身要留下go:embed 要求它存在才能编译,否则新克隆连
# `go test ./...` 都跑不起来 —— 只改后端的人不该被迫先装 node。
# 因此忽略里面的产物,只保留一个占位 index.html见该文件内注释
gateway/internal/static/static/*
!gateway/internal/static/static/index.html
# Go 构建产物
gateway/agentmail-gateway
gateway/gw
*.test
# ---- 运行态数据 ----
#
# SQLite 库与附件目录:生产在 /opt/agentmail/data
# 本地调试可能落在仓库里,绝不能提交(含真实邮件与凭证哈希)。
*.db
*.db-shm
*.db-wal
data/
attachments/
# ---- 凭证 ----
#
# 管理员密码、Agent 密钥、opencode server password 都在 env 文件里。
.env
*.env
# ---- Agent 工具的运行态目录 ----
#
# 这些是 pi / omo 在仓库里落的会话与后台任务状态,属于本机运行痕迹,
# 不是项目的一部分。
.pi/
.omo/
.pi-glla/
.codegraph
# ---- 编辑器与系统 ----
.DS_Store
*.swp
.idea/
.vscode/