const gulp = require("gulp");
const fileInclude = require("gulp-file-include");

gulp.task("html", function () {
  return gulp
    .src(["**/*.html"])
    .pipe(
      fileInclude({
        prefix: "@@",
        basepath: "@file",
      })
    )
    .pipe(gulp.dest("dist"));
});

gulp.task("copy-assets", function () {
  return gulp
    .src("assets/**/*", { encoding: false })
    .pipe(gulp.dest("dist/assets"));
});

gulp.task("default", gulp.series("html", "copy-assets"));
