Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

gulp watch - sometimes new files not injected in index.html #194

Closed
gruppjo opened this issue May 20, 2015 · 2 comments
Closed

gulp watch - sometimes new files not injected in index.html #194

gruppjo opened this issue May 20, 2015 · 2 comments

Comments

@gruppjo
Copy link
Contributor

gruppjo commented May 20, 2015

Maybe related to gulpjs/gulp#651
Which will also fix #146

I did some debugging and found out that the problem occurs when running the task inject-all. https://github.com/mwaylabs/generator-m/blob/master/app/templates/gulp_tasks/injecting.js#L16
Here's what happens:

  1. This task runs the wiredep task as its dependency which also manipulates the index.html.
  2. Since wiredep is running first, it triggers the changed event on the index.html which results in a livereload.
  3. Apparently when the inject-all task runs itself after wiredep has finished, no new change event is triggered.

Thus the index.html does contain the new file, but no livereload is performed and the new files is missing in the index.html.

I created a new issue with gulp gulpjs/gulp#1074

@gruppjo gruppjo changed the title gulp watch - new files not injected in index.html gulp watch - sometimes new files not injected in index.html May 20, 2015
@gruppjo gruppjo added this to the 1.2.0 milestone May 20, 2015
@gruppjo gruppjo modified the milestones: 1.2.0, 1.3.0 Jul 2, 2015
@gruppjo gruppjo removed this from the 1.3.0 milestone Sep 2, 2015
@yocontra
Copy link

FYI we have a new file watcher in gulp 4.0 so this can be closed

@gruppjo gruppjo added this to the outdated issues milestone Jan 27, 2017
@gruppjo
Copy link
Contributor Author

gruppjo commented Feb 1, 2017

closing, since the issue is outdated. Please feel free to comment, when you feel otherwise.

@gruppjo gruppjo closed this as completed Feb 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants