Open radum opened 8 years ago
Somehow answering my own question for others to find
I used gulp-handlebars
like this:
gulp.task('views', () => {
gulp.src(['views/**/*.hbs'])
.pipe($.handlebars({
handlebars: require('handlebars')
}))
.pipe($.defineModule('node'))
.pipe(gulp.dest('.bin/views/'));
});
var routes = require('./controllers/routes');
taunusExpress(taunus, app, {
routes: routes,
layout: require('./.bin/views/layouts/main')
});
How do you precompile Handlebars template to use them instead of Jade?