Skip to content

dominicbarnes/duo-handlebars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

duo-handlebars

A Handlebars plugin for Duo

Install

$ npm install --save duo-handlebars

Usage

CLI

$ duo --use duo-handlebars

API

var Duo = require('duo');
var handlebars = require('duo-handlebars');

var duo = Duo(__dirname)
    .entry('index.js') // JS file that requires a .hbs template
    .use(handlebars());

duo.run(function (err, file) {
    if (err) throw err;
    // file => will include compiled handlebars templates
});

Options

Whatever options are passed (other than extension) will be proxied directly to Handlebars.precompile()

extension

Determines what file extension to interpret handlebars templates as. (the default is "hbs")

About

A Handlebars plugin for Duo

Resources

License

Stars

Watchers

Forks

Packages

No packages published