How to use the emit function from gulp

Find comprehensive JavaScript gulp.emit code examples handpicked from public code repositorys.

18
19
20
21
22
23
24
25
26
27
function runTask(toRun) {
  const metadata = { task: toRun };
  // Gulp >= 4.0.0 (doesn't support events)
  const taskInstance = gulp.task(toRun);
  if (taskInstance === undefined) {
    gulp.emit('task_not_found', metadata);
    return;
  }
  const start = process.hrtime();
  gulp.emit('task_start', metadata);
fork icon0
star icon0
watch icon2

+ 4 other calls in file