Here is what I see when try to create a VS code task which should run a gulp task on folder open event. The code I've found on VS docs
Asked
Active
Viewed 660 times
1
-
See https://stackoverflow.com/questions/34103549/can-i-automatically-start-a-task-when-a-folder-is-opened/53755091?noredirect=1#comment105721270_53755091 – Mark Jan 17 '20 at 18:15
1 Answers
0
Instead we need to wrap this is a tasks object.
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Gulp Watch",
"runOptions": {
"runOn": "folderOpen"
},
"command": "cd wp-content/themes/name/ && gulp watch"
}
]
}

fdrv
- 852
- 1
- 11
- 21