Home

Awesome

engine-lodash NPM version Build Status

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

Usage

var lodash = require('engine-lodash');

API

.render

Lodash string support. Render the given str and invoke the callback callback(err, str).

Params

Example

var engine = require('engine-lodash');
engine.render('<%= name %>', {name: 'Jon'}, function (err, content) {
  console.log(content); //=> 'Jon'
});

.renderSync

Render Lo-Dash or underscore templates synchronously.

Params

Example

var engine = require('engine-lodash');
engine.renderSync('<%= name %>', {name: 'Halle'});
//=> 'Halle'

.renderFile

Lodash file support. Render a file at the given filepath and callback callback(err, str).

Params

Example

var engine = require('engine-lodash');
engine.renderFile('foo/bar/baz.tmpl', {name: 'Halle'});
//=> 'Halle'

Related projects

Authors

Jon Schlinkert

Brian Woodward

License

Copyright © 2014-2015 https://github.com/jonschlinkert Released under the MIT license.


This file was generated by verb-cli on August 21, 2015.