Reputation: 1235
Maybe someone figured out how to use .hbs or .html with browserify > backbone > gulp ?
If I skip gulp then ok, in view I require lets say file.hbs then in terminal
browserify -t hbsfy main.js > bundle.js
this command will package up my views with templates, but how to automate it with gulp?
Upvotes: 1
Views: 1061
Reputation: 1235
never mind, found hbs configuration:
gulp.task('js', function() {
gulp.src('js/app.js')
.pipe(browserify({
insertGlobals: true,
transform: ['hbsfy']
}))
.pipe(concat('app.js'))
.pipe(gulp.dest('./public/js'));
});
Upvotes: 1