Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

HTML watcher only works once #50

Closed
karin-n opened this issue Jun 8, 2016 · 3 comments · Fixed by FountainJS/generator-fountain-gulp#38
Closed

HTML watcher only works once #50

karin-n opened this issue Jun 8, 2016 · 3 comments · Fixed by FountainJS/generator-fountain-gulp#38

Comments

@karin-n
Copy link

karin-n commented Jun 8, 2016

First off - great work on the generator!

I have been running into an issue where the html change watcher only works once. E.g. I run 'gulp serve', make a change to an html file and the first time the browser refreshes successfully, but when I change the same html file again, the change is not detected. I can change a different html file which also triggers a browser refresh once. If I change a .ts file, the change is always detected. I have run the generator a few times and the issue is always reproducible.

Following is my setup and the configuration options I have used:

OS: OSX 10.11.5
Node version: 4.2.4
NPM version: 3.9.5

Framework: Angular 1
Modules manager: Webpack with NPM
CSS preprocessor: SASS
JS preprocessor: TypeScript
Sample app: Techs

Any help would be much appreciated!

@zckrs zckrs added the bug label Jun 8, 2016
@zckrs
Copy link
Member

zckrs commented Jun 8, 2016

Hi,

Can you replace "watch" function in gulpfile.js to

function watch(done) {
  gulp.watch(conf.path.src('app/**/*.html'), cb => {
    browserSync.reload();
    cb();
  });
  done();
}

@karin-n
Copy link
Author

karin-n commented Jun 8, 2016

Perfect! Thanks so much for the quick response :)

@zckrs
Copy link
Member

zckrs commented Jun 8, 2016

Should be fixed in the next release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants