Last Updated: February 25, 2016
·
2.254K
· stryju

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.