0.6.2 • Published 9 months ago
@doamatto/gulp-compile-handlebars v0.6.2
gulp-compile-handlebars
Forked from gulp-template, inspired by grunt-compile-handlebars, then forked again from kaanon/gulp-compile-handlebars.
Compile Handlebars templates
Install
Install with npm – npm install --save-dev gulp-compile-handlebars
Options
ignorePartials
: ignores any unknown partials. Useful if you only want to handle part of the filepartials
: Javascript object that will fill in partials using stringsbatch
: Javascript array of filepaths to use as partialshelpers
: Javascript functions to stand in for helpers used in the handlebars filescompile
: compile options. See handlebars reference for possible values
handlebars.Handlebars
Access the Handlebars library from the handlebars.Handlebars
property.
var handlebars = require('gulp-compile-handlebars');
var safestring = new handlebars.Handlebars.SafeString('<strong>HELLO! KAANON</strong>');
Works with gulp-data
Use gulp-data to pass a data object to the template based on the handlebars file being processed. If you pass template data, this will be extended with the object from gulp-data.
See gulp-data for usage examples.