Through the use of the grunt-contrib-watch plugin, we can do just that. This plugin allows us to watch for file system changes and run Grunt tasks in response.
It also enables more than just running Grunt tasks, though. With built-in support for the Livereload protocol, grunt-contrib-watch allows us to automatically push changes to our browser or reload the browser, when files are changed.
In this episode, then, you’ll see how to get grunt-contrib-watch to work inside your container, to both execute JSHint as needed, and to cause Livereload to send changes to our browsers on our behalf.