View Code? Open in Web Editor
NEW
Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.
Home Page: http://jonschlinkert.github.io/template-helpers
License: MIT License
template-helpers's People
Contributors
template-helpers's Issues
Hi.
Do you planning the comparison-helper?
Hi.
I failed to use this package in my assemble project.
"devDependencies": {
"assemble": "^0.9.0",
"gulp-extname": "^0.2.2",
"template-helpers": "^0.5.1"
}
my assemblefile.js
var assemble = require('assemble');
var extname = require('gulp-extname');
var app = assemble();
app.task('load', function(cb) {
app.layouts('templates/layouts/**/*.hbs');
app.partials('templates/partials/**/*.hbs');
app.pages('content/*.hbs');
var helpers = require('template-helpers')('math');
var math = {math: helpers};
app.helper('add', math);
cb();
});
app.task('content', ['load'], function() {
return app.toStream('pages')
.pipe(app.renderFile())
.on('err', console.error)
.pipe(extname())
.pipe(app.dest('dist'));
});
app.task('watch', function() {
app.watch('**/*.hbs', ['content']);
});
app.task('default', ['content'], app.parallel(['watch']));
module.exports = app;
content
but
[Error: Missing helper: "add"]
....