pry*_*oax 5 typescript tsc visual-studio-code vscode-tasks vscode-problem-matcher
我试图避免watch: true在tsconfig.json配置中使用。
通过 VSCode 的任务,我使用基本问题匹配器$tsc-watch,但在构建时它不会tsc以监视模式启动。我正在添加gulp支持,我看到有gulp-watch,但我想了解为什么$tsc-watch没有像我认为的那样工作。
我通过查看typescript扩展名发现了这一点taskProvider.js。为了发挥作用,需要设置tsc-watch任务。option: "watch"
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "typescript",
"tsconfig": "tsconfig.json",
"isBackground": true,
"problemMatcher": ["$tsc-watch"],
"option": "watch",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3139 次 |
| 最近记录: |