feat: package.json 优化方案

主要改动: 配置本地开发环境 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 命令中
This commit is contained in:
zdl
2025-10-29 16:00:21 +08:00
parent e5ab99bae6
commit e9b54ce10d
6 changed files with 79 additions and 8 deletions

View File

@@ -11,7 +11,8 @@
"Bash(npm install)",
"Bash(npm run start:mock)",
"Bash(npm install fsevents@latest --save-optional --force)",
"Bash(python -m py_compile:*)"
"Bash(python -m py_compile:*)",
"Bash(ps -p 20502,53360 -o pid,command)"
],
"deny": [],
"ask": []