从VS Code中的任务运行另一个任务

时间:2017-10-13 10:29:21

标签: visual-studio-code

是否可以从其他任务运行任务?

例如,我有两个任务:一个打印" Hello",另一个打印" World":

{
    "version": "2.0.0",
    "tasks": [
        {
            "taskName": "printHello",
            "type": "shell",
            "command": "echo Hello",
            "problemMatcher": []
        },
        {
            "taskName": "printWorld",
            "type": "shell",
            "command": "echo World",
            "problemMatcher": []
        },
        {
            "taskName": "printHelloWorld",
            "type": "shell",
            "command": "...",
            "problemMatcher": []
        }
    ]
}

我添加了第三个任务printHelloWorld,应首先调用任务printHello,然后调用printWorld

有可能吗?

0 个答案:

没有答案