Compile sleet files with Gulp.
gulp.task('sleet', function() {
gulp.src('./**/*.sleet')
.pipe(sleet({
extension: 'html',
handlebars: {
block: ['layout', 'view']
}
}))
.pipe(gulp.dest('./'));
});
or configurate it via package.json
{
...
"dependencies": {
...
},
"sleet": {
"extension": "html",
"handlebars": {
"block": ["layout", "view"]
}
}
}
and use it like:
gulp.task('sleet', function() {
gulp.src('./**/*.sleet')
.pipe(sleet())
.pipe(gulp.dest('./'));
});
gulp.task('sleet2', function() {
gulp.src('./**/*.sleet')
.pipe(sleet({ignore: ['hbs', 'html']})) // do not re-compile when there is a compiled file
.pipe(gulp.dest('./'));
});