engine-lodash
Lo-Dash engine, consolidate.js style but with enhancements. Works with Assemble, express.js, engine-cache or any application that follows consolidate.js conventions.
Last updated 10 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install engine-lodash 
SYNC missed versions from official npm registry.

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

  • 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'
});

.renderSync

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'

.renderFile

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'

Related projects

  • engine-handlebars: Handlebars engine, consolidate.js style but with enhancements. This works with Assemble, express.js, engine-cache or any… more | homepage
  • engine-less: Consolidate-style engine for rendering .less files. | homepage
  • helper-cache: Easily register and get helper functions to be passed to any template engine or node.js… more | homepage
  • template: Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… more | homepage
  • template-helpers: Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or… more | homepage

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.

Current Tags

  • 0.8.2                                ...           latest (9 years ago)

20 Versions

  • 0.8.2                                ...           9 years ago
  • 0.8.0                                ...           9 years ago
  • 0.7.1                                ...           10 years ago
  • 0.7.0                                ...           10 years ago
  • 0.6.3                                ...           10 years ago
  • 0.6.2                                ...           10 years ago
  • 0.6.1                                ...           10 years ago
  • 0.5.0                                ...           10 years ago
  • 0.4.3                                ...           10 years ago
  • 0.4.2                                ...           10 years ago
  • 0.4.0                                ...           10 years ago
  • 0.3.5                                ...           10 years ago
  • 0.3.3                                ...           10 years ago
  • 0.3.2                                ...           10 years ago
  • 0.3.1                                ...           10 years ago
  • 0.3.0                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (2)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (4)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE