grunt-contrib-watch icon indicating copy to clipboard operation
grunt-contrib-watch copied to clipboard

Does spawn:false have a known issue on Windows + livereload?

Open Francisc opened this issue 11 years ago • 9 comments

Hello,

Watch + livereaload works great. However, if I set spawn:false although the changes are caught, livereload doesn't fire.

Is this a known thing? I'm tempted by the faster response of the watcher when spawnning is false.

Francisc avatar Mar 31 '14 20:03 Francisc

Could you post your Gruntfile and node.js version? Thanks!

shama avatar Mar 31 '14 20:03 shama

Hello.

I'm using Node v0.10.26 on Windows 7x64.

Here's the watch config:

watch:{
    options:{
        spawn:false,
        debounceDelay:50
    },
    sass:{
        files:'css/**/*.scss',
        tasks:['sass:watcher']
    },
    livereload:{
        options:{
            livereload:35729
        },
        files:'css/style.css'
    }
}

Francisc avatar Mar 31 '14 20:03 Francisc

Forgot to mention that if I remove spawn:false, livereload works.

When set to false, livereload doesn't update the browser CSS but the watcher does observe file changes and runs the sass:watcher task.

Francisc avatar Mar 31 '14 20:03 Francisc

I am experiencing the exact same issue.

Richard-Walton avatar Aug 01 '14 09:08 Richard-Walton

same

Yankovsky avatar Dec 18 '14 05:12 Yankovsky

It works each second time

Yankovsky avatar Dec 18 '14 05:12 Yankovsky

I kind of fixed this issue by adding options: { livereload: true } to each watch task

Yankovsky avatar Dec 18 '14 05:12 Yankovsky

Same issue. I still lacking understanding about what the spawn means here.

ejoo avatar Oct 12 '16 23:10 ejoo

having the same problem. grunt-cli v1.2.0 grunt v1.0.1

dev-bjoern avatar Jan 24 '18 13:01 dev-bjoern