gulpfile.babel.js
function runAndWatch(watchPattern, initialValue, task) {
  gulp.watch(watchPattern, event => {
    task(event.path, event);
  });
  return task(initialValue);
}
function runAndWatch(watchPattern, initialValue, task) {
  gulp.watch(watchPattern, event => {
    task(event.path, event);
  });
  return task(initialValue);
}
function runAndWatch ( watchPattern , initialValue , task ) { gulp . watch ( watchPattern , event => { task ( event . path , event ) ; } ) ; return task ( initialValue ) ; }
Run a given task. And re-run it whenever the specified files change.
Run a given task . And re - run it whenever the specified files change .