主要改动: 配置本地开发环境 PostHog 上报到 Cloud\
1. 修改 npm start 默认行为
- start → 使用 .env.mock (默认 mock 数据)
- 添加 start:real → 使用 .env.local (真实后端)
2. 添加 PostHog 测试脚本
- 新增 test:tracking → 启用 PostHog debug 模式 + mock 数据
3. 清理冗余脚本
- 移除 start:local (冗余,只是调用 npm start)
- 重命名 install:clean → reinstall (移除自动启动)
- 添加 dev 快捷命令 (等同于 npm start)
- 添加 clean 命令 (只清理,不安装)
4. 优化 NODE_OPTIONS
- 不在每个命令中重复,通过注释说明可以提取为环境变量
- 保持 exit 0 在 lint 命令中
21 lines
565 B
JSON
21 lines
565 B
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"Read(//Users/qiye/**)",
|
|
"Bash(npm run lint:check)",
|
|
"Bash(npm run build)",
|
|
"Bash(chmod +x /Users/qiye/Desktop/jzqy/vf_react/scripts/*.sh)",
|
|
"Bash(node scripts/parseIndustryCSV.js)",
|
|
"Bash(cat:*)",
|
|
"Bash(npm cache clean --force)",
|
|
"Bash(npm install)",
|
|
"Bash(npm run start:mock)",
|
|
"Bash(npm install fsevents@latest --save-optional --force)",
|
|
"Bash(python -m py_compile:*)",
|
|
"Bash(ps -p 20502,53360 -o pid,command)"
|
|
],
|
|
"deny": [],
|
|
"ask": []
|
|
}
|
|
}
|