feat(day2): 更新课件
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
<div class="mt-6 text-sm">
|
||||
|
||||
- .env · application-dev.yml 中真实密码 · 数据库账号 · Redis 密码
|
||||
- target/ · node_modules/ · dist/
|
||||
- 日志文件 · IDE 本地配置
|
||||
- 真实配置:.env · application-dev.yml 中真实密码 · 数据库账号 · Redis 密码
|
||||
- 构建产物:target/ · node_modules/ · dist/
|
||||
- 本地痕迹:日志文件 · IDE 本地配置 · 临时导入导出文件
|
||||
- AI 上下文:不要把密钥、客户数据、生产日志喂给 AI
|
||||
</div>
|
||||
|
||||
<!--
|
||||
@@ -15,6 +16,27 @@
|
||||
|
||||
---
|
||||
|
||||
# 忽略配置审查流程
|
||||
|
||||
<div class="mt-5 text-sm">
|
||||
|
||||
| 步骤 | TRAE 要做什么 | 人要确认什么 |
|
||||
|---|---|---|
|
||||
| 1. 找文件 | 搜索 .gitignore、配置文件、日志目录 | 是否覆盖前后端两个工程 |
|
||||
| 2. 判风险 | 标出真实密钥、账号、IP、生产日志 | 是否误报示例配置 |
|
||||
| 3. 给建议 | 只输出新增忽略项和理由 | 是否会误忽略必要模板 |
|
||||
| 4. 再修改 | 经确认后再改 .gitignore | 是否保留 example/sample 文件 |
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
忽略配置不能让 AI 直接一把改完。
|
||||
先找文件,再判风险,再给建议,最后经人工确认修改。
|
||||
特别要注意,真实配置要忽略,但 example 或 sample 模板要保留,否则新人无法启动项目。
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
# 若依忽略配置检查 Prompt
|
||||
|
||||
<div class="mt-4 p-4 rounded-xl bg-blue-500/10 border border-blue-500/30 text-sm">
|
||||
@@ -32,3 +54,40 @@
|
||||
重点看后端 target、前端 node_modules 和 dist、日志文件、本地配置、数据库密码、Redis 密码、IDE 配置。
|
||||
同样,不要让 AI 直接改,先给审查报告。
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
# .gitignore 建议样例
|
||||
|
||||
<div class="mt-4 p-4 rounded-xl bg-emerald-500/10 border border-emerald-500/30 text-sm">
|
||||
|
||||
```text
|
||||
# backend build
|
||||
target/
|
||||
*.log
|
||||
logs/
|
||||
|
||||
# frontend build
|
||||
node_modules/
|
||||
dist/
|
||||
.vite/
|
||||
|
||||
# local secrets
|
||||
.env
|
||||
.env.local
|
||||
application-*.local.yml
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.iml
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
这是一个示例,不要求所有项目完全照抄。
|
||||
讲师要提醒学员:忽略项要结合项目实际路径检查。
|
||||
尤其 application-dev.yml 是否提交,要看团队是否把它当模板用。
|
||||
真实密码必须移除,模板配置可以改成占位符后保留。
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user