From 6d844b1007538fbc02c394b684db54ca1efe2a2f Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Fri, 15 Feb 2019 15:06:41 +0100 Subject: [PATCH] Better gulp error messages --- gulpfile.js | 35 +++++++++++++++++++++++------------ package.json | 3 ++- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b026928a7d..9837f2bf18 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,6 +4,7 @@ var gulp = require('gulp'), header = require('gulp-header'), concat = require('gulp-concat'), replace = require('gulp-replace'), + pump = require('pump'), fs = require('fs'), paths = { @@ -52,12 +53,17 @@ var gulp = require('gulp'), ); }; -gulp.task('components', function() { - return gulp.src(paths.components) - .pipe(inlineRegexSource()) - .pipe(uglify()) - .pipe(rename({ suffix: '.min' })) - .pipe(gulp.dest('components')); +gulp.task('components', function(cb) { + pump( + [ + gulp.src(paths.components), + inlineRegexSource(), + uglify(), + rename({ suffix: '.min' }), + gulp.dest('components') + ], + cb + ); }); gulp.task('build', function() { @@ -69,12 +75,17 @@ gulp.task('build', function() { .pipe(gulp.dest('./')); }); -gulp.task('plugins', ['languages-plugins'], function() { - return gulp.src(paths.plugins) - .pipe(inlineRegexSource()) - .pipe(uglify()) - .pipe(rename({ suffix: '.min' })) - .pipe(gulp.dest('plugins')); +gulp.task('plugins', ['languages-plugins'], function(cb) { + pump( + [ + gulp.src(paths.plugins), + inlineRegexSource(), + uglify(), + rename({ suffix: '.min' }), + gulp.dest('plugins') + ], + cb + ); }); gulp.task('components-json', function (cb) { diff --git a/package.json b/package.json index cbffb02aab..9ef549d3d8 100755 --- a/package.json +++ b/package.json @@ -27,9 +27,10 @@ "gulp-concat": "^2.3.4", "gulp-header": "^1.0.5", "gulp-rename": "^1.2.0", - "gulp-uglify": "^0.3.1", "gulp-replace": "^0.5.4", + "gulp-uglify": "^0.3.1", "mocha": "^2.2.5", + "pump": "^3.0.0", "yargs": "^3.26.0" }, "jspm": {