johnpapa / johnpapa/gulp-patterns
running fonts function 2 times can fail, add a wait will help
- Dominant language
- JavaScript
- Stars
- 499
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
When you use clean-fonts in the fonts task and you run the fonts task twice,it will fail 1 time.

If you run them separate , so first gulp task clean-fonts and then fonts,it works always.
It seems there is some problem with the creation of the 4.4.0 subdirectory data in the pipeline.
When you put a wait before the copy it works for me, you can put a wait of 50 instead of 1500,but with 1500 you see the directories dissapear and re-appear in visual studio code.
I think the bug is that the copy starts for the fonts in the directory and subdirectories while the deletion and creation of the subdirectories is still not done yet.
gulp.task('fonts', ['clean-fonts'], function () {
log('Copying fonts');
return gulp
.src(config.root + config.fonts)
```
.pipe($.wait(1500))
.pipe(gulp.dest(config.build + 'fonts'));
```
});
DeleteShare
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.