When the Task Runner Explorer opens it will pull up all of the task from gulpfile.js that is in the root directory of the project.
In this case it shows the 5 task that are available in the gulpfile.js
After the task is opened up, to run a task, right-click on it and select the run option.
When a task it run, it will open up a tab in the Task Runner explorer and show the results of the gulp task
For the demo, we have right-clicked on the default task and selected the run option.
Manually running a task is nice but it is even better if you can integrate it into the Visual Studio build process. Luckily the Task Runner Explorer, give you just that option. If you right-click on a task and select Bindings, you can see the options.
There are 4 bindings options:
For this example, we are going to set the “Before Build” binding for the default task. Right-click on the default task, select Bindings, and then Before Build.
When you set the binding, 2 things happened in the Task Runner Explorer:
If you right-click on the default task and select binding there will be a checkmark next to the “Before Build” to indicate that it is set for this task.
Also, if you open up the gulpfile.js, you will notice that the first line now has a comment with the bindings in it.
Now as a Visual Studio user, you kow how to run your gulp task without leaving Visual Studio and how to integrate it into the Visual Studio build process.