Lo-Dash engine, consolidate.js style but with enhancements. Works with Assemble, express.js, engine-cache or any application that follows consolidate.js conventions.
Install with npm
$ npm i engine-lodash --save
var lodash = require('engine-lodash');
Lodash string support. Render the given str and invoke the callback callback(err, str).
Params
str {String}options {Object|Function}: or callback.callback {Function}Example
var engine = require('engine-lodash');
engine.render('<%= name %>', {name: 'Jon'}, function (err, content) {
console.log(content); //=> 'Jon'
});
Render Lo-Dash or underscore templates synchronously.
Params
str {Object}: The string to render.options {Object}: Object of options.returns {String}: Rendered string.Example
var engine = require('engine-lodash');
engine.renderSync('<%= name %>', {name: 'Halle'});
//=> 'Halle'
Lodash file support. Render a file at the given filepath and callback callback(err, str).
Params
path {String}options {Object|Function}: or callback function.callback {Function}Example
var engine = require('engine-lodash');
engine.renderFile('foo/bar/baz.tmpl', {name: 'Halle'});
//=> 'Halle'
Jon Schlinkert
Brian Woodward
Copyright © 2014-2015 https://github.com/jonschlinkert Released under the MIT license.
This file was generated by verb-cli on August 21, 2015.