In this recipe, you will add the watch
plugin. This plugin enables you to watch files and folders for any changes and execute certain tasks upon any change. In this recipe, you will add the watch task to watch for changes in the development folder and trigger the Less task every time any of the Less files is changed.
The only requirement for this recipe is to have the watch
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-contrib-watch --save-dev