The concurrent task enables you to run several tasks concurrently. This is particularly useful when working with tasks such as the connect or watch task that stay active and block the tasks after them.
In this recipe, you will learn how to use the concurrent plugin to run the connect, open, and watch tasks at the same time. This will allow you to run one command to start the server and automatically open the browser window and watch the files for changes to reload the browser as you save any of the files.
The only requirement for this recipe is to have the concurrent plugin installed and loaded in your Gruntfile.js
file. If you have not installed this plugin in the Installing Grunt plugins recipe of this chapter, you can do this using the following command in the root of your project:
$ npm install grunt-concurrent --save-dev