engine-cache
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -177,3 +177,3 @@ 'use strict'; | ||
} | ||
if (key === '__express') { | ||
if (key === '__express' && !fn.hasOwnProperty('renderFile')) { | ||
engine.renderFile = fn[key]; | ||
@@ -233,3 +233,3 @@ } | ||
var helpers = mergeHelpers(engine, options); | ||
var compiled = compile ? compile(str, helpers) : null; | ||
var compiled = compile ? compile.call(engine, str, helpers) : null; | ||
@@ -262,6 +262,6 @@ return function(locals, cb) { | ||
if (typeof cb !== 'function') { | ||
return renderSync(str, data); | ||
return renderSync.call(engine, str, data); | ||
} | ||
render(str, data, function(err, str) { | ||
render.call(engine, str, data, function(err, str) { | ||
if (err) { | ||
@@ -268,0 +268,0 @@ cb(err); |
{ | ||
"name": "engine-cache", | ||
"description": "express.js inspired template-engine manager.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/jonschlinkert/engine-cache", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -117,2 +117,4 @@ # engine-cache [![NPM version](https://img.shields.io/npm/v/engine-cache.svg?style=flat)](https://www.npmjs.com/package/engine-cache) [![NPM monthly downloads](https://img.shields.io/npm/dm/engine-cache.svg?style=flat)](https://npmjs.org/package/engine-cache) [![NPM total downloads](https://img.shields.io/npm/dt/engine-cache.svg?style=flat)](https://npmjs.org/package/engine-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/engine-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/engine-cache) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/engine-cache.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/engine-cache) | ||
**v0.19.0** ensure the string is only rendered once by passing the compiled function to the `render` method | ||
**v0.18.0** the `.load` method was renamed to `.setHelpers` | ||
@@ -119,0 +121,0 @@ |
21330
178