Recently we upgraded to Gulp 4. However, the following things still need to be addressed in some way:

- If a task series is executed with an anonymous function inside it, we'll see `Starting '<anonymous>'` in the output, which isn't that great. We need to either suppress it or use named functions.
- If a task is private, it should be hidden in some way. For example, `gh-pages-prepare` is only used in the public `web` target and should not be used on its own, however currently it shows in the default `gulp` output since it's a regular task. Perhaps we should mark them with an underscore?
}
gulp.task(
  "dist-pre",
  gulp.series(
    "generic",
    "generic-legacy",
    "components",
    "components-legacy",
    "image_decoders",
    "image_decoders-legacy",
    "lib",
    "minified",
    "minified-legacy",
    "types",
    function () {
      console.log();
      console.log("### Cloning baseline distribution");
      rimraf.sync(DIST_DIR);
      mkdirp.sync(DIST_DIR);
      safeSpawnSync("git", ["clone", "--depth", "1", DIST_REPO_URL, DIST_DIR]);
      console.log();
      console.log("### Overwriting all files");
      rimraf.sync(path.join(DIST_DIR, "*"));
      
      const [packageJsonSrc, bowerJsonSrc] = packageBowerJson();
      return merge([
        packageJsonSrc.pipe(gulp.dest(DIST_DIR)),
        bowerJsonSrc.pipe(gulp.dest(DIST_DIR)),
        vfs
          .src("external/dist/**/*", { base: "external/dist", stripBOM: false })