小编n0n*_*4m3的帖子

配置VSCode以执行不同的任务

我在Visual Studio Code中有一个TypeScript项目,具有以下任务:

{
  "version": "0.1.0",

  // The command is tsc.
  "command": "tsc",

  // Show the output window only if unrecognized errors occur. 
  "showOutput": "silent",

  // Under windows use tsc.exe. This ensures we don't need a shell.
  "windows": {
    "command": "tsc"
  },

  "isShellCommand": true,

  // args is the program to compile.
  "args": [],

  // use the standard tsc problem matcher to find compile problems in the output.
  "problemMatcher": "$tsc"
}
Run Code Online (Sandbox Code Playgroud)

当我们按"Ctrl + Shift + B"进行构建时,这很有效.

是否有可能有另一个任务,当我们按"F5"运行/调试它通过命令行运行命令?

谢谢.

configuration typescript visual-studio-code

3
推荐指数
1
解决办法
8164
查看次数