Now for something super amazing. Instead of running the gulp task explicitly, lets have gulp run our tasks when the files change.
First reorganize some of our tasks:
- Rename default task to css.
Next create our file watching task. Could you guess what?… there isn’t a plugin for this. It is just part of gulp.
We will create a gulp watch task to watch our contents folder and run our default task on file change.
I know what you are going to say: “Blah, blah, blah… there is a plugin.” and you are correct.