Comparing version 2.5.4 to 2.5.5
2.5.5 / 2012-01-08 | ||
================== | ||
* Fixed: set `filename` on cached templates [matthewleon] | ||
2.5.4 / 2012-01-02 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -31,3 +31,3 @@ | ||
exports.version = '2.5.4'; | ||
exports.version = '2.5.5'; | ||
@@ -34,0 +34,0 @@ /** |
@@ -50,3 +50,6 @@ | ||
exports.compile = function(view, cache, cid, options){ | ||
if (cache && cid && cache[cid]) return cache[cid]; | ||
if (cache && cid && cache[cid]){ | ||
options.filename = cache[cid].path; | ||
return cache[cid]; | ||
} | ||
@@ -62,3 +65,3 @@ // lookup | ||
throw err; | ||
} | ||
} | ||
@@ -69,3 +72,3 @@ // compile | ||
cache[cid] = view; | ||
return view; | ||
@@ -87,7 +90,7 @@ }; | ||
* | ||
* - partial `_<name>` | ||
* - any `<name>/index` | ||
* - non-layout `../<name>/index` | ||
* - any `<root>/<name>` | ||
* - partial `<root>/_<name>` | ||
* - partial `_<name>` | ||
* - any `<name>/index` | ||
* - non-layout `../<name>/index` | ||
* - any `<root>/<name>` | ||
* - partial `<root>/_<name>` | ||
* | ||
@@ -168,3 +171,3 @@ * @param {String} view | ||
union(options, parentLocals); | ||
// Merge locals | ||
@@ -210,3 +213,3 @@ if (locals) merge(options, locals); | ||
buf += render(); | ||
} | ||
} | ||
} else { | ||
@@ -236,3 +239,3 @@ keys = Object.keys(collection); | ||
/** | ||
* Render `view` partial with the given `options`. Optionally a | ||
* Render `view` partial with the given `options`. Optionally a | ||
* callback `fn(err, str)` may be passed instead of writing to | ||
@@ -243,3 +246,3 @@ * the socket. | ||
* | ||
* - `object` Single object with name derived from the view (unless `as` is present) | ||
* - `object` Single object with name derived from the view (unless `as` is present) | ||
* | ||
@@ -251,3 +254,3 @@ * - `as` Variable name for each `collection` value, defaults to the view name. | ||
* | ||
* - `collection` Array of objects, the name is derived from the view name itself. | ||
* - `collection` Array of objects, the name is derived from the view name itself. | ||
* For example _video.html_ will have a object _video_ available to it. | ||
@@ -306,3 +309,3 @@ * | ||
* Options: | ||
* | ||
* | ||
* - `scope` Template evaluation context (the value of `this`) | ||
@@ -443,3 +446,3 @@ * - `debug` Output debugging information | ||
return str; | ||
// render complete, and | ||
// render complete, and | ||
// callback given | ||
@@ -468,2 +471,2 @@ } else if (fn) { | ||
console.error(); | ||
} | ||
} |
{ | ||
"name": "express", | ||
"description": "Sinatra inspired web development framework", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
111242
21
2557