When I use gulp-merge plugin I have two problems I can not understand:
1) Why do I see in console the next text when task "images" starts:
"D:\home\projects\storyBook>gulp images
[15:05:23] Using gulpfile D:\home\projects\storyBook\gulpfile.js
[15:05:23] Starting 'images'..."
But when task is finished I do NOT see the next text:
"[12:13:56] Finished 'images' after 72 ms"
Why do not I get this text? I do streams merge and then return merged stream to have synchronous task. Maybe I do something wrong? Only sometimes I get this message.
2) If I add one code line to my privous code:
streams.allThemeImages = plugins.merge(streams.themesImages);
return streams.allThemeImages.pipe(gulp.dest('temp/')); // HERE IS NEW CODE LINE
I expect that in temp folder I'll have the next images:
temp/
1.png
2.png
3.png
4.png
Because I merged streams, first one contains 1.png and 2.png images and second one contains 3.png and 4.png. But in reality I get the next files:
temp/
1.png
2.png
Sometimes I get only 1.png inside temp folder and sometimes all work well and I get all images inside temp folder.
What is wrong?
When I use merge2 plugin insted of gulp-merge, all works well and I have not these two problems! Why?
I have the next files structure:
and the next gulpfile:
When I use gulp-merge plugin I have two problems I can not understand: 1) Why do I see in console the next text when task "images" starts:
But when task is finished I do NOT see the next text:
Why do not I get this text? I do streams merge and then return merged stream to have synchronous task. Maybe I do something wrong? Only sometimes I get this message.
2) If I add one code line to my privous code:
I expect that in temp folder I'll have the next images:
Because I merged streams, first one contains 1.png and 2.png images and second one contains 3.png and 4.png. But in reality I get the next files:
Sometimes I get only 1.png inside temp folder and sometimes all work well and I get all images inside temp folder.
What is wrong?
When I use merge2 plugin insted of gulp-merge, all works well and I have not these two problems! Why?