{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
    {
      "type": "shell",
      "command": "npm run debug",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "dependsOn": "Terminate All Tasks",
      "isBackground": true, //This prevents the launch.json to wait for the completion of the task
      "problemMatcher": {
        "fileLocation": "relative",
        "owner": "custom", //This is not needed but, required by the problemMatcher Object
        "pattern": {
          "regexp": "^$" //This is not needed but, required by the problemMatcher Object
        },
        "background": {
          "activeOnStart": true,
          "beginsPattern": "^$",
          "endsPattern": "^You can now view (.*) in the browser.$"
        }
      },
      "label": "Start Notesnook (web)"
    },
    {
      "label": "Terminate All Tasks",
      "command": "echo ${input:terminate}",
      "type": "shell",
      "problemMatcher": []
    }
  ],
  "inputs": [
    {
      "id": "terminate",
      "type": "command",
      "command": "workbench.action.tasks.terminate",
      "args": "terminateAll"
    }
  ]
}
