johnpapa / johnpapa/gulp-patterns

running fonts function 2 times can fail, add a wait will help

Open
#123 0 comments 0 reactions 0 assignees View on GitHub
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.

![image](https://cloud.githubusercontent.com/assets/3684599/15607136/d8eb1514-2410-11e6-9ad4-c9e5ca8bb6d6.png)

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.