Check for runSequence

I have the following task in my gulpfile:

gulp.task('build', function (cb) {
  return runSequence(
    'clean',
    'tsd',
    'ts-lint',
    ['sass', 'copy-assets', 'ts-compile', 'templates', 'copy-vendor'],
    'karma-once',
    'index',
    cb
  );
});

How to check if any of the tasks runSequencein gulp are working?

+4
source share
1 answer

A callback function that runSequencetakes as the last argument gives an object errif some task is not completed.

runSequence('mytask', ['othertask'], function(err) {
    if (err) {
        // you can check for err.message or err.task for the name of the task
    }
});
+6
source

Source: https://habr.com/ru/post/1570206/


All Articles