Created
September 2, 2021 22:47
-
-
Save dbugshe2/a440474bbd1a9fa3aa570bdd9ebf8561 to your computer and use it in GitHub Desktop.
Use Gulp to complie handlebars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gulpfile.js | |
const handlebars = require('gulp-compile-handlebars'); | |
const rename = require('gulp-rename'); | |
gulp.task('html', () => { | |
return gulp.src('./src/pages/*.hbs') | |
.pipe(handlebars({}, { | |
ignorePartials: true, | |
batch: ['./src/partials'] | |
})) | |
.pipe(rename({ | |
extname: '.html' | |
})) | |
.pipe(gulp.dest('./dist')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment