katana-hbs-helpers
v1.6.1
Published
## Usage
Downloads
58
Readme
Katana Handlebars Helpers
Usage
npm install --save-dev katana-hbs-helpers
Using vanilla Handlebars
var helpers = require('katana-hbs-helpers');
var Handlebars = require('handlebars');
helpers.forEach(function (helper) {
Handlebars.registerHelper(helper.name, helper);
});
Using gulp-compile-handlebars
var gulp = require('gulp');
var handlebars = require('gulp-compile-handlebars');
var helpers = require('katana-hbs-helpers');
gulp.task('default', function () {
return gulp.src('*.hbs')
.pipe(handlebars({
helpers: helpers
}))
.pipe(gulp.dest('./dist'));
});
In Katana gulpfile.js
const kHelpers = require('katana-hbs-helpers');
const cHelpers = require('@cloudfour/hbs-helpers');
const helpers = Object.assign(kHelpers, cHelpers);
// Append to config
Object.assign(config.drizzle, { helpers })