express-view
Advanced tools
Comparing version 0.0.1-beta to 0.0.1-rc
@@ -12,3 +12,3 @@ /* | ||
var View = require('./lib/view'), | ||
debug = require('debug')('express:lang'); | ||
debug = require('debug')('express:view'); | ||
@@ -15,0 +15,0 @@ function extendApp(app) { |
@@ -11,3 +11,3 @@ /* | ||
The `require("express-view/lib/view")` exposes an express view class that relies | ||
on templates stored on the bundle objects within locator. | ||
on templates stored on `bundle.template` object within locator. | ||
@@ -19,4 +19,4 @@ @module express-view | ||
"use strict"; | ||
var debug = require('debug')('express:lang:view'); | ||
var debug = require('debug')('express:view'); | ||
@@ -91,5 +91,5 @@ /** | ||
rootBundle = locator.getRootBundle(); | ||
if (rootBundle && rootBundle.templates && rootBundle.templates[name]) { | ||
if (rootBundle && rootBundle.template && rootBundle.template[name]) { | ||
debug('Template "%s" resolved from root bundle thru `locator`', name); | ||
return rootBundle.templates[name]; | ||
return rootBundle.template[name]; | ||
} | ||
@@ -99,5 +99,5 @@ | ||
bundle = options && options.bundle && locator.getBundle(options.bundle); | ||
if (bundle && (bundle !== rootBundle) && bundle.templates && bundle.templates[name]) { | ||
if (bundle && (bundle !== rootBundle) && bundle.template && bundle.template[name]) { | ||
debug('Template "%s" resolved from bundle "%s" thru `locator`', name, options.bundle); | ||
return bundle.templates[name]; | ||
return bundle.template[name]; | ||
} | ||
@@ -109,7 +109,7 @@ }; | ||
* | ||
* @method layout | ||
* @method layoutLookup | ||
* @param {Object} options the `options` passed as the second argument when calling `res.render()` | ||
* @return {function} the compiled layout view or null. | ||
*/ | ||
View.prototype.layout = function (options) { | ||
View.prototype.layoutLookup = function (options) { | ||
var layoutName = (options && options.layout) || this.layout, | ||
@@ -136,3 +136,3 @@ layout; | ||
var template = this.lookup(this.name, options), | ||
layout = this.layout(options); | ||
layout = this.layoutLookup(options); | ||
@@ -149,1 +149,3 @@ if (!template) { | ||
}; | ||
module.exports = View; |
{ | ||
"name" : "express-view", | ||
"description": "Express view class for synthetic views.", | ||
"version" : "0.0.1-beta", | ||
"version" : "0.0.1-rc", | ||
"homepage" : "https://github.com/caridy/express-view", | ||
@@ -6,0 +6,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11077
190
0