webxl / grunt-reload

A grunt task and reverse proxy that enables live reloading of updated files in the browser.
MIT License
132 stars 19 forks source link

Infinite reloading #22

Closed chuwy closed 11 years ago

chuwy commented 11 years ago

I'm starting project with grunt-0.4.0rc5 and grunt-reload from master branch. I configured grunt-reload to work with liverload extension and install it. After I run grunt it said:

Running "connect:server" (connect) task
Starting connect web server on localhost:8001.

Running "reload" task
Attempting reload at http://localhost:35729/triggerReload
Reload server running at http://localhost:35729

Running "watch" task
Waiting...Thu Jan 17 2013 17:31:36 GMT+0800 (KRAT) Connection accepted.

And after I made some changes in my watched files it starts to run my default task without stop. May be it caused by last changes it grunt-0.4.0rc5 API associated with this.file https://github.com/gruntjs/grunt/issues/606 ?

chuwy commented 11 years ago

Seems that it was my fault. grunt-watch task was watching root directory, coffeescript was compiled and js changed, therefore watch task is restarted infinitely.

mayank-gangwal commented 6 years ago

I am facing the same problem. My DOM is not getting stabilised, while it is loading infinitely. Here's my watch.js code:

module.exports = {
 scripts: {
    files: [
    'src/app/**/*.js'
    ],
    tasks: ['jshint','karma:unit','copy','injector','replace'],
    options: {
      spawn: false,
      livereload:true
    },
  }
};

I have removed all the files from files array except my main app folder containing JS.