klei/gulp-inject — pull request #69 by alexbyk (2014-11-22 01:36:37+00:00)
Title: added a feature to read target after sources are generated

Hi. If sources are generated for a while (coffee+lint+uglify), target.html could be changed between read and final write, so a result of gulp-inject() -> gulp.dest() will overwrite those changes and make some problems.

This commit offer an solution to solve this problem:
```javascript
gulp.src('./index.html', {read: false})
.pipe(inject(slowTaskStream))
.pipe(gulp.dest('./'))
```

So the content of index.html will be read just right before injection when slowTaskStream is ready and immediately written to disk, which decrease a possibility to get a corrupted content.

Also it's a good idea to recommend using this feature in docs.