【发布时间】:2020-02-24 21:06:50
【问题描述】:
我正在开发一个provide tasks 的 VSCode 扩展,我如何指定一个属性可以根据平台更改,例如在“shell”任务中我们可以拥有这个tasks.json:
"tasks": [
{
"type": "shell",
"windows": { "command": "wndCmd.exe" },
"linux": { "command": "lnxCmd" },
"osx": { "command": "osxCmd" }
}]
但对我来说这是不可能的。
从文档示例中,不可能创建如下任务:
"tasks": [
{
"type": "rake",
"task": "some",
"windows": { "file": "winFile" },
"linux": { "file": "linuxFile" },
"osx": { "file": "osxFile" }
}]
【问题讨论】:
标签: visual-studio-code vscode-extensions vscode-tasks