Callbacks return too fast
MartijnCuppens opened this issue · 2 comments
MartijnCuppens commented
The callbacks in the gulp tasks just run when when all tasks are initiated, not when they are finished. For example for the CSS:
Lines 12 to 17 in c80fc04
We'll probably need to add all the tasks to an array and return the callback only when every task is finished.
Same issue for js and img tasks.
MartijnCuppens commented
I tried this, with no success:
function css(cb) {
config.scss.forEach(async scss => {
await cssCompile({src: config.src_base_path + scss.src, dest: config.dest_base_path + scss.dest});
});
cb();
}
Also tried to add each cssCompile
function to an array which is returned in the end, also didn't work. I haven't figured out how all these callbacks work exactly, if there's anyone who can help me out with this, feel free to contribute ❤️
gijsroge commented
Could you elaborate what this issue causes? Does it trigger a reload too fast or? And how can I reproduce?