gulp-patterns icon indicating copy to clipboard operation
gulp-patterns copied to clipboard

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

Open stefanaerts opened this issue 8 years ago • 0 comments

When you use clean-fonts in the fonts task and you run the fonts task twice,it will fail 1 time.

image

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

stefanaerts avatar May 27 '16 11:05 stefanaerts