Skip to content

Instantly share code, notes, and snippets.

@himanshurajora
Created May 7, 2023 17:01
Show Gist options
  • Save himanshurajora/6497d9dd7acdcda850c5aeb57535f698 to your computer and use it in GitHub Desktop.
Save himanshurajora/6497d9dd7acdcda850c5aeb57535f698 to your computer and use it in GitHub Desktop.
Gulp file with file include in html, basic configuration
const gulp = require("gulp");
const comments = require("gulp-header-comment");
const fileInclude = require("gulp-file-include");
const path = {
src: {
html: "src/**/*.html",
},
};
gulp.task("html", () => {
return gulp
.src(path.src.html)
.pipe(
fileInclude({
basepath: "src/partial",
})
)
.pipe(comments(`Website by Vedik Devs`))
.pipe(gulp.dest("./output"));
});
gulp.task("default", gulp.series("html"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment