javascript - gulp notification dependent on task completion without .pipe -
i know can use node-notifier there better way set notification dependent on task being complete (and not use .pipe)
the below works there way achieve within single task?
// perform data task gulp.task('imgdata1', function() { imageexport.record({ path: path.images_src, output: path.images_data, template: 'custom.hbs', breakpointdelimiter: '--' }) }); // perform notification task gulp.task('imgdata2', ['imgdata1'], function() { notifier.notify({ 'title': 'my notification', 'message': 'data task complete!' }); }); // perform data task notification task gulp.task('imgdata', ['imgdata2']);
image-size-export
accepts callback invoked when imageexport.record()
has finished. run notifier.notify()
in callback:
gulp.task('imgdata', function() { imageexport.record({ path: path.images_src, output: path.images_data, template: 'custom.hbs', breakpointdelimiter: '--' }, function() { notifier.notify({ 'title': 'my notification', 'message': 'data task complete!' }); }); });
Comments
Post a Comment