How to run multiple tasks in VS Code on build?

后端 未结 4 1682
感动是毒
感动是毒 2021-01-31 09:36

Using tasks.json version 2.0.0, I have not been able to make it so that, when I build my application, multiple tasks are run at the same time. I\'m using gulp for m

4条回答
  •  被撕碎了的回忆
    2021-01-31 10:09

    You can use Compound Tasks.

    The example below executes "Client Build" and "Server Build" tasks when "Build" task is called.

    {
      "version": "2.0.0",
      "tasks": [
        {
          "label": "Client Build",
          "command": "gulp",
          "args": ["build"],
          "options": {
            "cwd": "${workspaceFolder}/client"
          }
        },
        {
          "label": "Server Build",
          "command": "gulp",
          "args": ["build"],
          "options": {
            "cwd": "${workspaceFolder}/server"
          }
        },
        {
          "label": "Build",
          "dependsOn": ["Client Build", "Server Build"]
        }
      ]
    }
    

提交回复
热议问题