Handlebars support for JS Transformers
npm i --save jstransformer-handlebars
npm test
For more use-cases see the tests
var hbs = require('jstransformer')(require('jstransformer-handlebars'));
var opts = {};
var compile = hbs.compile('<h1>Hello {{place}}!</h1>', opts);
compile.fn({place: 'world'});
//=> '<h1>Hello world!</h1>'
var result = hbs.render('<h1>Hello {{place}}!</h1>', opts, {place: 'world'});
console.log(result.body);
//=> '<h1>Hello world!</h1>'
var promise = hbs.renderFileAsync('./path/to/hello.toffee', opts, {place: 'world'});
promise.then(function(result) {
console.log(result.body);
//=> '<h1>Hello world!</h1>'
});
Copyright (c) 2015 JSTransformers, contributors.
Released under the MIT
license.
Proudly generated by docks(1), April 14, 2015