VS 代码,运行 gulp 任务。不接受值。有效值:"shell"

VS code, run gulp task. Value is not accepted. Valid values: "shell"

这是我在尝试创建 VS 代码任务时看到的内容,该任务应该 运行 文件夹打开事件上的 gulp 任务。我在 VS docs

上找到的代码

相反,我们需要包装 this is a tasks 对象。

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "shell",
            "label": "Gulp Watch",
            "runOptions": {
                "runOn": "folderOpen"
            },
            "command": "cd wp-content/themes/name/ && gulp watch"
        }
    ]
}