tansci/.vscode/tasks.json
xuewuerduo ae64616b89 chore: 重构开发启动脚本为跨平台 dev.sh,添加 VS Code 任务配置
- 新增 dev.sh:Linux/Git Bash 通用,杀端口旧进程后启动前后端
- 新增 .vscode/tasks.json:Ctrl+Shift+B 一键重启,前后端独立终端
- 删除 restart.sh:旧 Linux 专用脚本(含硬编码路径)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 23:20:18 +08:00

69 lines
1.9 KiB
JSON

{
"version": "2.0.0",
"tasks": [
{
"label": "启动后端",
"type": "shell",
"command": "bash dev.sh backend",
"isBackground": true,
"group": "build",
"problemMatcher": {
"pattern": { "regexp": "^(.*)$" },
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "."
}
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"group": "backend"
}
},
{
"label": "启动前端",
"type": "shell",
"command": "bash dev.sh frontend",
"isBackground": true,
"group": "build",
"problemMatcher": {
"pattern": { "regexp": "^(.*)$" },
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "."
}
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"group": "frontend"
}
},
{
"label": "重启全部",
"dependsOn": ["启动后端", "启动前端"],
"dependsOrder": "parallel",
"group": { "kind": "build", "isDefault": true },
"problemMatcher": []
},
{
"label": "关闭全部",
"type": "shell",
"command": "bash dev.sh kill",
"problemMatcher": []
},
{
"label": "环境检查",
"type": "shell",
"command": "bash dev.sh check",
"problemMatcher": []
}
]
}