templates
Advanced tools
Comparing version 0.17.3 to 0.18.0
29
index.js
@@ -60,26 +60,8 @@ /*! | ||
/** | ||
* Inherit `Base` | ||
* Inherit `Base` and load static plugins | ||
*/ | ||
Base.extend(Templates); | ||
Base.bubble(Templates, ['preInit', 'Init']); | ||
plugin.static(Base, Templates, 'Templates'); | ||
/** | ||
* Mixin static methods | ||
*/ | ||
plugin.is(Templates); | ||
/** | ||
* Mixin prototype methods | ||
*/ | ||
plugin.routes(Templates.prototype); | ||
plugin.engine(Templates.prototype); | ||
plugin.layout(Templates.prototype); | ||
plugin.render(Templates.prototype); | ||
plugin.lookup(Templates.prototype); | ||
plugin.errors(Templates.prototype, 'Templates'); | ||
/** | ||
* Initialize Templates | ||
@@ -92,6 +74,2 @@ */ | ||
if (!this.plugins) { | ||
this.plugins = {}; | ||
} | ||
this.items = {}; | ||
@@ -109,2 +87,4 @@ this.views = {}; | ||
this.use(plugin.helpers); | ||
this.use(plugin.lookup); | ||
this.use(plugin.item('item', 'Item')); | ||
@@ -292,2 +272,3 @@ this.use(plugin.item('view', 'View')); | ||
var collection = this.collection(opts, true); | ||
utils.setInstanceNames(collection, name); | ||
@@ -294,0 +275,0 @@ // get the collection inflections, e.g. page/pages |
@@ -30,3 +30,3 @@ 'use strict'; | ||
Base.call(this); | ||
Base.call(this, {}, options); | ||
this.is('Collection'); | ||
@@ -33,0 +33,0 @@ this.use(utils.option()); |
@@ -43,3 +43,4 @@ 'use strict'; | ||
if (!view) { | ||
return utils.helperError(this.app, single, name, cb); | ||
utils.helperError(this.app, single, name, cb); | ||
return; | ||
} | ||
@@ -49,5 +50,4 @@ | ||
debug('"%s" pre-rendering "%s"', single, name); | ||
var self = this; | ||
this.app.render(view, ctx, function(err, res) { | ||
view.render(ctx, function(err, res) { | ||
if (err) return cb(err); | ||
@@ -54,0 +54,0 @@ |
@@ -41,10 +41,12 @@ 'use strict'; | ||
// if no view is found, return an empty string | ||
if (!view) return cb(null, ''); | ||
if (!view) { | ||
cb(null, ''); | ||
return; | ||
} | ||
// create the context | ||
var ctx = this.context.merge(locals); | ||
var self = this; | ||
// render the view | ||
return this.app.render(view, ctx, function(err, res) { | ||
view.render(ctx, function(err, res) { | ||
if (err) return cb(err); | ||
@@ -51,0 +53,0 @@ |
@@ -77,4 +77,4 @@ 'use strict'; | ||
Base.inherit(Item, Vinyl); | ||
Base.extend(Item); | ||
Base.inherit(Item, Vinyl); | ||
@@ -81,0 +81,0 @@ /** |
@@ -46,24 +46,8 @@ 'use strict'; | ||
/** | ||
* Inherit `Base` | ||
* Inherit `Base` and load static plugins | ||
*/ | ||
Base.extend(List); | ||
plugin.static(Base, List, 'List'); | ||
/** | ||
* Decorate static methods | ||
*/ | ||
plugin.is(List); | ||
/** | ||
* Mixin prototype methods | ||
*/ | ||
plugin.routes(List.prototype); | ||
plugin.engine(List.prototype); | ||
plugin.layout(List.prototype); | ||
plugin.render(List.prototype); | ||
plugin.errors(List.prototype, 'List'); | ||
/** | ||
* Initalize `List` defaults | ||
@@ -126,3 +110,3 @@ */ | ||
var item = this.item(key, value); | ||
utils.isName(item, 'Item', true); | ||
utils.setInstanceNames(item, 'Item'); | ||
@@ -129,0 +113,0 @@ debug('adding item "%s"', item.key); |
'use strict'; | ||
var async = require('async'); | ||
var debug = require('debug'); | ||
@@ -21,3 +20,3 @@ var utils = require('../utils'); | ||
debug.helper = function(key) { | ||
return debug('base:templates:helper:', key);; | ||
return debug('base:templates:helper:', key); | ||
}; | ||
@@ -290,6 +289,9 @@ | ||
async.reduce(names, partials, function(acc, name, cb) { | ||
utils.each(names, function(name, cb) { | ||
var collection = self.views[name]; | ||
var keys = Object.keys(collection); | ||
async.eachOf(collection, function(view, key, next) { | ||
utils.each(keys, function(key, next) { | ||
var view = collection[key]; | ||
// handle `onMerge` middleware | ||
@@ -309,14 +311,41 @@ self.handleOnce('onMerge', view, function(err, file) { | ||
//=> {'foo.hbs': 'some content...'}; | ||
acc[name] = acc[name] || {}; | ||
acc[name][key] = file.content; | ||
next(null, acc); | ||
partials[name] = partials[name] || {}; | ||
partials[name][key] = file.content; | ||
next(); | ||
}); | ||
}, function(err) { | ||
if (err) return cb(err); | ||
cb(null, partials); | ||
}); | ||
}, done); | ||
}.bind(app); | ||
}, cb); | ||
}, function(err) { | ||
if (err) return done(err); | ||
done(null, partials); | ||
}); | ||
// async.reduce(names, partials, function(acc, name, cb) { | ||
// var collection = self.views[name]; | ||
// async.eachOf(collection, function(view, key, next) { | ||
// // handle `onMerge` middleware | ||
// self.handleOnce('onMerge', view, function(err, file) { | ||
// if (err) return next(err); | ||
// if (file.options.nomerge) { | ||
// return next(); | ||
// } | ||
// if (opts.mergePartials !== false) { | ||
// name = 'partials'; | ||
// } | ||
// // convert the partial to: | ||
// //=> {'foo.hbs': 'some content...'}; | ||
// acc[name] = acc[name] || {}; | ||
// acc[name][key] = file.content; | ||
// next(null, acc); | ||
// }); | ||
// }, function(err) { | ||
// if (err) return cb(err); | ||
// cb(null, partials); | ||
// }); | ||
// }, done); | ||
}; | ||
app.define('mergePartialsAsync', mergePartials.async); | ||
}; |
@@ -8,2 +8,8 @@ 'use strict'; | ||
* `collection` instance. | ||
* | ||
* ```js | ||
* // register the plugin, define the method name to use | ||
* // and the constructor name to use when inspected | ||
* app.use(item('view', 'View')); | ||
* ``` | ||
*/ | ||
@@ -15,9 +21,8 @@ | ||
/** | ||
* Returns a new item, using the `Item` class | ||
* currently defined on the instance. | ||
* Returns a new item, using the `Item` class currently defined on the instance. | ||
* | ||
* ```js | ||
* var item = app.item('foo', {conetent: '...'}); | ||
* var view = app.view('foo', {content: '...'}); | ||
* // or | ||
* var item = app.item({path: 'foo', conetent: '...'}); | ||
* var view = app.view({path: 'foo', content: '...'}); | ||
* ``` | ||
@@ -54,3 +59,5 @@ * @name .item | ||
item.path = item.path || key; | ||
if (typeof item.is === 'function') { | ||
item.is(CtorName); | ||
} | ||
@@ -67,2 +74,3 @@ // prime commonly needed objects on `item` | ||
item.path = item.path || key; | ||
item.key = this.renameKey.call(this, item.key || key, item); | ||
@@ -69,0 +77,0 @@ |
@@ -11,23 +11,24 @@ 'use strict'; | ||
return function(app) { | ||
app.define('renameKey', function renameKey(key, view, fn) { | ||
if (typeof view === 'function') { | ||
return renameKey.call(this, key, { path: key }, view); | ||
} | ||
this.define('renameKey', renameKey); | ||
function renameKey(key, file, fn) { | ||
if (typeof key === 'function') { | ||
return renameKey.call(this, null, null, key); | ||
fn = key; | ||
key = null; | ||
file = null; | ||
} | ||
if (typeof fn !== 'function') { | ||
fn = this.option('renameKey'); | ||
if (typeof file === 'function') { | ||
fn = file; | ||
file = null; | ||
} | ||
if (typeof fn !== 'function') { | ||
fn = utils.identity; | ||
fn = app.option('renameKey') || utils.identity; | ||
} | ||
this.options.renameKey = fn; | ||
app.options.renameKey = fn; | ||
if (typeof key === 'string') { | ||
return fn.call(this, key, view); | ||
return fn(key, file); | ||
} | ||
return this; | ||
}.bind(app)); | ||
return app; | ||
} | ||
}; | ||
}; |
@@ -56,2 +56,5 @@ 'use strict'; | ||
function getView(app, view) { | ||
if (typeof view !== 'string') { | ||
return view; | ||
} | ||
if (app.isCollection) { | ||
@@ -149,3 +152,5 @@ view = app.getView(view); | ||
/** | ||
* Asynchronously compile `content` with the given `locals` and callback. | ||
* Asynchronously compile `content` with the given `locals` and callback. _(fwiw, this | ||
* method name uses the unconventional "*Async" nomenclature to allow us to preserve the | ||
* synchronous behavior of the `view.compile` method as well as the name)_. | ||
* | ||
@@ -158,3 +163,2 @@ * ```js | ||
* ``` | ||
* | ||
* @name .compileAsync | ||
@@ -161,0 +165,0 @@ * @param {Object|String} `view` View object. |
@@ -66,3 +66,3 @@ 'use strict'; | ||
// just handle the route and return | ||
if (!(this.isApp && view.options.collection)) { | ||
if (this.isCollection || !view.options.collection) { | ||
this.router.handle(view, done); | ||
@@ -75,3 +75,3 @@ return; | ||
this.router.handle(view, function(err) {; | ||
this.router.handle(view, function(err) { | ||
if (err) return done(err); | ||
@@ -78,0 +78,0 @@ collection.handle(method, view, done); |
'use strict'; | ||
var fs = require('fs'); | ||
var debug = require('debug'); | ||
var utils = require('lazy-cache')(require); | ||
@@ -22,2 +21,3 @@ var fn = require; | ||
require('array-sort', 'sortBy'); | ||
require('async-each', 'each'); | ||
require('clone'); | ||
@@ -37,2 +37,3 @@ require('clone-stats'); | ||
require('paginationator'); | ||
require('pascalcase', 'pascal'); | ||
require('set-value', 'set'); | ||
@@ -291,15 +292,2 @@ | ||
/** | ||
* Create a class name from the given string. | ||
* | ||
* ```js | ||
* utils.toClassName('foo'); | ||
* //=> 'Foo' | ||
* ``` | ||
*/ | ||
utils.toClassName = function toClassName(str) { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}; | ||
/** | ||
* Convenience method for setting `this.isFoo` and `this._name = 'Foo' | ||
@@ -309,9 +297,5 @@ * on the given `app` | ||
utils.isName = function isName(app, name, force) { | ||
if (!app._name || force === true) { | ||
name = utils.toClassName(name); | ||
utils.define(app, 'is' + name, true); | ||
utils.define(app, '_name', name); | ||
utils.define(app, 'name', name); | ||
} | ||
utils.setInstanceNames = function setInstanceNames(app, name) { | ||
utils.define(app, 'is' + utils.pascal(name), true); | ||
utils.define(app, '_name', name); | ||
}; | ||
@@ -361,3 +345,2 @@ | ||
/** | ||
@@ -364,0 +347,0 @@ * Return true if the given value looks like a |
@@ -57,6 +57,9 @@ 'use strict'; | ||
View.prototype.context = function(locals) { | ||
var args = [].concat.apply([], [].slice.call(arguments)); | ||
var ctx = utils.merge({}, this.locals, this.data); | ||
args.unshift(ctx); | ||
return utils.merge.apply(utils.merge, args); | ||
if (arguments.length > 1) { | ||
locals = [].concat.apply([], [].slice.call(arguments)); | ||
} else { | ||
locals = utils.arrayify(locals); | ||
} | ||
locals.unshift(utils.merge({}, this.locals, this.data)); | ||
return utils.merge.apply(utils.merge, locals); | ||
}; | ||
@@ -63,0 +66,0 @@ |
@@ -42,24 +42,8 @@ 'use strict'; | ||
/** | ||
* Inherit `Base` | ||
* Inherit `Base` and load plugins | ||
*/ | ||
Base.extend(Views); | ||
plugin.static(Base, Views, 'Views'); | ||
/** | ||
* Decorate static methods | ||
*/ | ||
plugin.is(Views); | ||
/** | ||
* Mixin prototype methods | ||
*/ | ||
plugin.routes(Views.prototype); | ||
plugin.engine(Views.prototype); | ||
plugin.layout(Views.prototype); | ||
plugin.render(Views.prototype); | ||
plugin.errors(Views.prototype, 'Views'); | ||
/** | ||
* Initialize `Views` defaults | ||
@@ -142,12 +126,5 @@ */ | ||
// if `view is not an instance of `View`, it will still | ||
// be decorated with `base` methods, so call `initBase()` | ||
// to initialize all base defaults | ||
if (!view.isView && view.initBase) { | ||
view.initBase(); | ||
} | ||
// set the name to be used by the `inspect` method and emitter | ||
var name = this.options.inflection || 'view'; | ||
utils.isName(view, name, true); | ||
utils.setInstanceNames(view, name); | ||
@@ -154,0 +131,0 @@ // set the `viewType` (partial, layout, or renderable) |
{ | ||
"name": "templates", | ||
"description": "System for creating and managing template collections, and rendering templates with any node.js template engine. Can be used as the basis for creating a static site generator or blog framework.", | ||
"version": "0.17.3", | ||
"version": "0.18.0", | ||
"homepage": "https://github.com/jonschlinkert/templates", | ||
@@ -25,3 +25,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"array-sort": "^0.1.2", | ||
"async": "^1.5.2", | ||
"async-each": "^1.0.0", | ||
"base": "^0.8.1", | ||
@@ -32,3 +32,3 @@ "base-data": "^0.4.4", | ||
"clone": "^1.0.2", | ||
"clone-stats": "0.0.1", | ||
"clone-stats": "^1.0.0", | ||
"debug": "^2.2.0", | ||
@@ -39,3 +39,3 @@ "deep-bind": "^0.3.0", | ||
"engine-base": "^0.1.2", | ||
"engine-cache": "^0.16.1", | ||
"engine-cache": "^0.16.2", | ||
"export-files": "^2.1.1", | ||
@@ -56,2 +56,3 @@ "extend-shallow": "^2.0.1", | ||
"paginationator": "^0.1.3", | ||
"pascalcase": "^0.1.1", | ||
"set-value": "^0.3.3", | ||
@@ -58,0 +59,0 @@ "template-error": "^0.1.2", |
130
README.md
@@ -165,3 +165,3 @@ # templates [![NPM version](https://img.shields.io/npm/v/templates.svg?style=flat)](https://www.npmjs.com/package/templates) [![NPM downloads](https://img.shields.io/npm/dm/templates.svg?style=flat)](https://npmjs.org/package/templates) [![Build Status](https://img.shields.io/travis/jonschlinkert/templates.svg?style=flat)](https://travis-ci.org/jonschlinkert/templates) | ||
### [.list](index.js#L185) | ||
### [.list](index.js#L165) | ||
@@ -186,3 +186,3 @@ Create a new list. See the [list docs](docs/lists.md) for more information about lists. | ||
### [.collection](index.js#L224) | ||
### [.collection](index.js#L204) | ||
@@ -199,3 +199,3 @@ Create a new collection. Collections are decorated with special methods for getting and setting items from the collection. Note that, unlike the [create](#create) method, collections created with `.collection()` are not cached. | ||
### [.create](index.js#L276) | ||
### [.create](index.js#L256) | ||
@@ -211,3 +211,3 @@ Create a new view collection to be stored on the `app.views` object. See | ||
### [.setup](index.js#L405) | ||
### [.setup](index.js#L386) | ||
@@ -456,3 +456,3 @@ Expose static `setup` method for providing access to an instance before any other use code is run. | ||
### [.compile](lib/view.js#L78) | ||
### [.compile](lib/view.js#L81) | ||
@@ -475,3 +475,3 @@ Synchronously compile a view. | ||
### [.render](lib/view.js#L96) | ||
### [.render](lib/view.js#L99) | ||
@@ -493,3 +493,3 @@ Asynchronously render a view. | ||
### [.isType](lib/view.js#L130) | ||
### [.isType](lib/view.js#L133) | ||
@@ -508,3 +508,3 @@ Return true if the view is the given view `type`. Since types are assigned by collections, views that are "collection-less" will not have a type, and thus will always return `false` (as expected). | ||
### [.data](lib/plugins/context.js#L42) | ||
### [.data](lib/plugins/context.js#L41) | ||
@@ -528,3 +528,3 @@ Set, get and load data to be passed to templates as context at render-time. | ||
### [.context](lib/plugins/context.js#L62) | ||
### [.context](lib/plugins/context.js#L61) | ||
@@ -539,3 +539,3 @@ Build the context for the given `view` and `locals`. | ||
### [setHelperOptions](lib/plugins/context.js#L116) | ||
### [setHelperOptions](lib/plugins/context.js#L115) | ||
@@ -550,3 +550,3 @@ Update context in a helper so that `this.helper.options` is | ||
### [.mergePartials](lib/plugins/context.js#L238) | ||
### [.mergePartials](lib/plugins/context.js#L237) | ||
@@ -562,3 +562,3 @@ Merge "partials" view types. This is necessary for template | ||
### [.mergePartialsAsync](lib/plugins/context.js#L278) | ||
### [.mergePartialsAsync](lib/plugins/context.js#L277) | ||
@@ -611,3 +611,3 @@ Merge "partials" view types. This is necessary for template engines | ||
### [.data](lib/plugins/context.js#L42) | ||
### [.data](lib/plugins/context.js#L41) | ||
@@ -631,3 +631,3 @@ Set, get and load data to be passed to templates as context at render-time. | ||
### [.context](lib/plugins/context.js#L62) | ||
### [.context](lib/plugins/context.js#L61) | ||
@@ -642,3 +642,3 @@ Build the context for the given `view` and `locals`. | ||
### [setHelperOptions](lib/plugins/context.js#L116) | ||
### [setHelperOptions](lib/plugins/context.js#L115) | ||
@@ -653,3 +653,3 @@ Update context in a helper so that `this.helper.options` is | ||
### [.mergePartials](lib/plugins/context.js#L238) | ||
### [.mergePartials](lib/plugins/context.js#L237) | ||
@@ -665,3 +665,3 @@ Merge "partials" view types. This is necessary for template | ||
### [.mergePartialsAsync](lib/plugins/context.js#L278) | ||
### [.mergePartialsAsync](lib/plugins/context.js#L277) | ||
@@ -697,3 +697,3 @@ Merge "partials" view types. This is necessary for template engines | ||
### [.setView](lib/views.js#L137) | ||
### [.setView](lib/views.js#L121) | ||
@@ -714,3 +714,3 @@ Set a view on the collection. This is identical to [addView](#addView) except `setView` does not emit an event for each view. | ||
### [.addView](lib/views.js#L184) | ||
### [.addView](lib/views.js#L161) | ||
@@ -732,3 +732,3 @@ Similar to [setView](#setView), adds a view to the collection but also fires an event and iterates over the loading `queue` for loading views from the `addView` event listener. If the given view is not already an instance of `View`, it will be converted to one before being added to the `views` object. | ||
### [.deleteView](lib/views.js#L207) | ||
### [.deleteView](lib/views.js#L184) | ||
@@ -748,3 +748,3 @@ Delete a view from collection `views`. | ||
### [.addViews](lib/views.js#L231) | ||
### [.addViews](lib/views.js#L208) | ||
@@ -768,3 +768,3 @@ Load multiple views onto the collection. | ||
### [.addList](lib/views.js#L265) | ||
### [.addList](lib/views.js#L242) | ||
@@ -788,3 +788,3 @@ Load an array of views onto the collection. | ||
### [.groupBy](lib/views.js#L302) | ||
### [.groupBy](lib/views.js#L279) | ||
@@ -803,3 +803,3 @@ Group all collection `views` by the given property, properties or compare functions. See [group-array](https://github.com/doowb/group-array) for the full range of available features and options. | ||
### [.getView](lib/views.js#L319) | ||
### [.getView](lib/views.js#L296) | ||
@@ -820,3 +820,3 @@ Get view `name` from `collection.views`. | ||
### [.extendView](lib/views.js#L354) | ||
### [.extendView](lib/views.js#L331) | ||
@@ -836,3 +836,3 @@ Load a view from the file system. | ||
### [.isType](lib/views.js#L369) | ||
### [.isType](lib/views.js#L346) | ||
@@ -851,7 +851,7 @@ Return true if the collection belongs to the given view `type`. | ||
### [.viewTypes](lib/views.js#L416) | ||
### [.viewTypes](lib/views.js#L393) | ||
Alias for `viewType` | ||
### [.data](lib/plugins/context.js#L42) | ||
### [.data](lib/plugins/context.js#L41) | ||
@@ -875,3 +875,3 @@ Set, get and load data to be passed to templates as context at render-time. | ||
### [.context](lib/plugins/context.js#L62) | ||
### [.context](lib/plugins/context.js#L61) | ||
@@ -886,3 +886,3 @@ Build the context for the given `view` and `locals`. | ||
### [setHelperOptions](lib/plugins/context.js#L116) | ||
### [setHelperOptions](lib/plugins/context.js#L115) | ||
@@ -897,3 +897,3 @@ Update context in a helper so that `this.helper.options` is | ||
### [.mergePartials](lib/plugins/context.js#L238) | ||
### [.mergePartials](lib/plugins/context.js#L237) | ||
@@ -909,3 +909,3 @@ Merge "partials" view types. This is necessary for template | ||
### [.mergePartialsAsync](lib/plugins/context.js#L278) | ||
### [.mergePartialsAsync](lib/plugins/context.js#L277) | ||
@@ -1104,3 +1104,3 @@ Merge "partials" view types. This is necessary for template engines | ||
### [.data](lib/plugins/context.js#L42) | ||
### [.data](lib/plugins/context.js#L41) | ||
@@ -1124,3 +1124,3 @@ Set, get and load data to be passed to templates as context at render-time. | ||
### [.context](lib/plugins/context.js#L62) | ||
### [.context](lib/plugins/context.js#L61) | ||
@@ -1135,3 +1135,3 @@ Build the context for the given `view` and `locals`. | ||
### [setHelperOptions](lib/plugins/context.js#L116) | ||
### [setHelperOptions](lib/plugins/context.js#L115) | ||
@@ -1146,3 +1146,3 @@ Update context in a helper so that `this.helper.options` is | ||
### [.mergePartials](lib/plugins/context.js#L238) | ||
### [.mergePartials](lib/plugins/context.js#L237) | ||
@@ -1158,3 +1158,3 @@ Merge "partials" view types. This is necessary for template | ||
### [.mergePartialsAsync](lib/plugins/context.js#L278) | ||
### [.mergePartialsAsync](lib/plugins/context.js#L277) | ||
@@ -1190,3 +1190,3 @@ Merge "partials" view types. This is necessary for template engines | ||
### [.setItem](lib/list.js#L123) | ||
### [.setItem](lib/list.js#L107) | ||
@@ -1207,3 +1207,3 @@ Set an item on the collection. This is identical to [addItem](#addItem) except `setItem` does not emit an event for each item and does not iterate over the item `queue`. | ||
### [.addItem](lib/list.js#L160) | ||
### [.addItem](lib/list.js#L144) | ||
@@ -1225,3 +1225,3 @@ Similar to [setItem](#setItem), adds an item to the list but also fires an event and iterates over the item `queue` to load items from the `addItem` event listener. If the given item is not already an instance of `Item`, it will be converted to one before being added to the `items` object. | ||
### [.addItems](lib/list.js#L187) | ||
### [.addItems](lib/list.js#L171) | ||
@@ -1245,3 +1245,3 @@ Load multiple items onto the collection. | ||
### [.addList](lib/list.js#L216) | ||
### [.addList](lib/list.js#L200) | ||
@@ -1264,3 +1264,3 @@ Load an array of items or the items from another instance of `List`. | ||
### [.hasItem](lib/list.js#L253) | ||
### [.hasItem](lib/list.js#L237) | ||
@@ -1282,3 +1282,3 @@ Return true if the list has the given item (name). | ||
### [.getIndex](lib/list.js#L269) | ||
### [.getIndex](lib/list.js#L253) | ||
@@ -1299,3 +1299,3 @@ Get a the index of a specific item from the list by `key`. | ||
### [.getItem](lib/list.js#L313) | ||
### [.getItem](lib/list.js#L297) | ||
@@ -1316,3 +1316,3 @@ Get a specific item from the list by `key`. | ||
### [.getView](lib/list.js#L332) | ||
### [.getView](lib/list.js#L316) | ||
@@ -1333,3 +1333,3 @@ Proxy for `getItem` | ||
### [.deleteItem](lib/list.js#L346) | ||
### [.deleteItem](lib/list.js#L330) | ||
@@ -1348,3 +1348,3 @@ Remove an item from the list. | ||
### [.extendItem](lib/list.js#L365) | ||
### [.extendItem](lib/list.js#L349) | ||
@@ -1360,3 +1360,3 @@ Decorate each item on the list with additional methods | ||
### [.groupBy](lib/list.js#L384) | ||
### [.groupBy](lib/list.js#L368) | ||
@@ -1375,3 +1375,3 @@ Group all list `items` using the given property, properties or compare functions. See [group-array](https://github.com/doowb/group-array) for the full range of available features and options. | ||
### [.sortBy](lib/list.js#L410) | ||
### [.sortBy](lib/list.js#L394) | ||
@@ -1391,3 +1391,3 @@ Sort all list `items` using the given property, properties or compare functions. See [array-sort](https://github.com/jonschlinkert/array-sort) for the full range of available features and options. | ||
### [.paginate](lib/list.js#L458) | ||
### [.paginate](lib/list.js#L442) | ||
@@ -1405,3 +1405,3 @@ Paginate all `items` in the list with the given options, See [paginationator](https://github.com/doowb/paginationator) for the full range of available features and options. | ||
### [.data](lib/plugins/context.js#L42) | ||
### [.data](lib/plugins/context.js#L41) | ||
@@ -1425,3 +1425,3 @@ Set, get and load data to be passed to templates as context at render-time. | ||
### [.context](lib/plugins/context.js#L62) | ||
### [.context](lib/plugins/context.js#L61) | ||
@@ -1436,3 +1436,3 @@ Build the context for the given `view` and `locals`. | ||
### [setHelperOptions](lib/plugins/context.js#L116) | ||
### [setHelperOptions](lib/plugins/context.js#L115) | ||
@@ -1447,3 +1447,3 @@ Update context in a helper so that `this.helper.options` is | ||
### [.mergePartials](lib/plugins/context.js#L238) | ||
### [.mergePartials](lib/plugins/context.js#L237) | ||
@@ -1459,3 +1459,3 @@ Merge "partials" view types. This is necessary for template | ||
### [.mergePartialsAsync](lib/plugins/context.js#L278) | ||
### [.mergePartialsAsync](lib/plugins/context.js#L277) | ||
@@ -1556,3 +1556,3 @@ Merge "partials" view types. This is necessary for template engines | ||
### [.compile](lib/plugins/render.js#L91) | ||
### [.compile](lib/plugins/render.js#L94) | ||
@@ -1582,5 +1582,5 @@ Compile `content` with the given `locals`. | ||
### [.compileAsync](lib/plugins/render.js#L165) | ||
### [.compileAsync](lib/plugins/render.js#L169) | ||
Asynchronously compile `content` with the given `locals` and callback. | ||
Asynchronously compile `content` with the given `locals` and callback. _(fwiw, this method name uses the unconventional "*Async" nomenclature to allow us to preserve the synchronous behavior of the `view.compile` method as well as the name)_. | ||
@@ -1603,3 +1603,3 @@ **Params** | ||
### [.render](lib/plugins/render.js#L252) | ||
### [.render](lib/plugins/render.js#L256) | ||
@@ -1625,3 +1625,3 @@ Render a view with the given `locals` and `callback`. | ||
### [.data](lib/plugins/context.js#L42) | ||
### [.data](lib/plugins/context.js#L41) | ||
@@ -1645,3 +1645,3 @@ Set, get and load data to be passed to templates as context at render-time. | ||
### [.context](lib/plugins/context.js#L62) | ||
### [.context](lib/plugins/context.js#L61) | ||
@@ -1656,3 +1656,3 @@ Build the context for the given `view` and `locals`. | ||
### [setHelperOptions](lib/plugins/context.js#L116) | ||
### [setHelperOptions](lib/plugins/context.js#L115) | ||
@@ -1667,3 +1667,3 @@ Update context in a helper so that `this.helper.options` is | ||
### [.mergePartials](lib/plugins/context.js#L238) | ||
### [.mergePartials](lib/plugins/context.js#L237) | ||
@@ -1679,3 +1679,3 @@ Merge "partials" view types. This is necessary for template | ||
### [.mergePartialsAsync](lib/plugins/context.js#L278) | ||
### [.mergePartialsAsync](lib/plugins/context.js#L277) | ||
@@ -2078,2 +2078,2 @@ Merge "partials" view types. This is necessary for template engines | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 20, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._ |
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
172396
33
4088
33
+ Addedasync-each@^1.0.0
+ Addedpascalcase@^0.1.1
+ Addedasync-each@1.0.6(transitive)
+ Addedclone-stats@1.0.0(transitive)
+ Addedpascalcase@0.1.1(transitive)
- Removedasync@^1.5.2
- Removedasync@1.5.2(transitive)
Updatedclone-stats@^1.0.0
Updatedengine-cache@^0.16.2