Skip to content

Instantly share code, notes, and snippets.

@meeglos
Created March 10, 2020 01:56
Show Gist options
  • Save meeglos/726681397d711503edf72cd23736e542 to your computer and use it in GitHub Desktop.
Save meeglos/726681397d711503edf72cd23736e542 to your computer and use it in GitHub Desktop.
Gulpfile for html includes
const gulp = require('gulp');
const fileinclude = require('gulp-file-include');
gulp.task('fileinclude', async function() {
gulp.src([
'src/index.html',
'src/about.html'
])
.pipe(fileinclude({
prefix: '@@',
basepath: '@file'
}))
.pipe(gulp.dest('dist'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment