grunt-contrib-compass[watch] working with livereload
if you, like me, are using grunt-concurrent
to run grunt-contrib-watch
and grunt-contrib-compass
with watch
option enabled, you probably ave struggled with triggering the livereload
here's the how: add a config for watch
task, that will watch for changes to the processed files, not the sources
so adding section like
watch : {
options : {
livereload : true
},
// ... all the other watchers
styles : {
files : 'public/styles/**/*.css'
}
}
now, once the grunt-contrib-compass
watcher is done with the processing, it will write that to output folder, which will trigger livereload event from grunt-contrib-watch
without triggering -
as simple as that.
Written by tomasz stryjewski
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Watch
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#