Speed Up Grunt (with Livereload)
Grunt is amazing, but when developing on Windows I found my grunt tasks would take a while when working with a CSS preprocessor and grunt-watch.
According to the Github page, the nospawn
option can help speed things up, but may be prone to erroneous builds. The latter has not been a problem for over 500+ builds.
Onto the tip: In your gruntfile.js, where you have declared your watch object, add this:
nospawn: true
. That's it, a sample config file and before and after screen is below. Happy grunting.
Example:
watch: {
options: {
nospawn: true,
livereload: true
},
css: {
Before and after:
Written by Brad
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Grunt
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#