I want to execute SaveAll from a task such as evoking workbench.action.files.saveAll from within Task.
The objective is to make sure all files are saved before triggering series of other Tasks.
- Task #1: SaveAll (
workbench.action.files.saveAll) - Task #2: Run Grunt that
dependsOnTask#1
The tasks.json looks something like this
{
"version": "2.0.0",
"tasks": [
{
"command": "workbench.action.files.saveAll",
"label": "SaveAllFiles",
},
{
"type": "grunt",
"task": "default",
"label": "Execute Grunt",
"dependsOn": [
"SaveAllFiles"
],
"problemMatcher": []
}
]
}
In theory, all I should have to do is execute the task labeled Execute Grunt, and it will call the SaveAllFiles task. To be precise, I don't want to trigger tasks based on Save or SaveAll events; there are times when I want to save files, but not trigger other tasks.