Skip to content

Commit

Permalink
Fix js & img tasks from logging being finished before actually being …
Browse files Browse the repository at this point in the history
…finished (#38)
  • Loading branch information
MartijnCuppens authored Oct 4, 2019
1 parent 643d632 commit 43106c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/gulp/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const newer = require('gulp-newer');
const gulpSvgSprite = require('gulp-svg-sprite');
const gulp = require('gulp');
const plumber = require('gulp-plumber');
const merge = require('merge-stream');
const config = require('./config.js');

// CSS task
Expand All @@ -16,7 +17,7 @@ function img() {
return svgSprite({src: config.src_base_path + svg.src, dest: config.dest_base_path + svg.dest, name: svg.name});
});

return Promise.all(imgTasks.concat(spriteTasks));
return merge(imgTasks.concat(spriteTasks));
}

// Optimize Images
Expand Down
3 changes: 2 additions & 1 deletion lib/gulp/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const presetEnv = require('@babel/preset-env');
const concat = require('gulp-concat');
const gulp = require('gulp');
const plumber = require('gulp-plumber');
const merge = require('merge-stream');
const config = require('./config.js');

function js() {
Expand All @@ -15,7 +16,7 @@ function js() {
return jsConcat({src: config.src_base_path + js.src, dest: config.dest_base_path + js.dest, name: js.name});
});

return Promise.all(jsTasks.concat(jsConcatTasks));
return merge(jsTasks.concat(jsConcatTasks));
}

function jsCompile({src, dest, browserSync = false}) {
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"gulp-svg-sprite": "^1.5.0",
"gulp-terser": "^1.2.0",
"js-yaml": "^3.13.1",
"merge-stream": "^2.0.0",
"postcss-load-config": "^2.1.0",
"rfs": "^9.0.0",
"rimraf": "^3.0.0",
Expand Down

0 comments on commit 43106c3

Please sign in to comment.