Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

templates

Package Overview
Dependencies
Maintainers
3
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

templates - npm Package Compare versions

Comparing version 0.17.1 to 0.17.2

lib/utils.js

10

lib/plugins/context.js

@@ -77,13 +77,15 @@ 'use strict';

debug.context('binding helpers for %s <%s>', view.options.inflection, view.basename);
var cached = this._.helpers;
var optsHelpers = utils.isObject(this.options.helpers) ? this.options.helpers : {};
// merge cached _synchronous_ helpers with helpers defined on `app.options`
var helpers = utils.extend({}, this.options.helpers, cached.sync);
var helpers = utils.extend({}, optsHelpers, this._.helpers.sync);
// add helpers defined on the context
helpers = utils.extend({}, helpers, context.helpers);
if (utils.isObject(context.helpers)) {
helpers = utils.extend({}, helpers, context.helpers);
}
// if any _async_ helpers are defined, merge those onto the context LAST
if (isAsync) {
helpers = utils.extend({}, helpers, cached.async);
helpers = utils.extend({}, helpers, this._.helpers.async);
}

@@ -90,0 +92,0 @@

3

lib/plugins/routes.js

@@ -8,3 +8,2 @@ 'use strict';

debug('loading routes methods onto %s, <%s>', proto.constructor.name);
var define = require('define-property');

@@ -130,3 +129,3 @@ /**

if (err._handled) return cb();
define(err, '_handled', true);
utils.define(err, '_handled', true);
err.source = err.stack.split('\n')[1].trim();

@@ -133,0 +132,0 @@ err.reason = app._name + '#handle("' + method + '"): ' + view.path;

{
"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.1",
"version": "0.17.2",
"homepage": "https://github.com/jonschlinkert/templates",

@@ -126,2 +126,2 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

}
}
}
# 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)
> 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.
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.

@@ -40,4 +40,2 @@ ## TOC

_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
## Install

@@ -533,3 +531,3 @@

### [setHelperOptions](lib/plugins/context.js#L114)
### [setHelperOptions](lib/plugins/context.js#L116)

@@ -544,3 +542,3 @@ Update context in a helper so that `this.helper.options` is

### [.mergePartials](lib/plugins/context.js#L236)
### [.mergePartials](lib/plugins/context.js#L238)

@@ -556,3 +554,3 @@ Merge "partials" view types. This is necessary for template

### [.mergePartialsAsync](lib/plugins/context.js#L276)
### [.mergePartialsAsync](lib/plugins/context.js#L278)

@@ -634,3 +632,3 @@ Merge "partials" view types. This is necessary for template engines

### [setHelperOptions](lib/plugins/context.js#L114)
### [setHelperOptions](lib/plugins/context.js#L116)

@@ -645,3 +643,3 @@ Update context in a helper so that `this.helper.options` is

### [.mergePartials](lib/plugins/context.js#L236)
### [.mergePartials](lib/plugins/context.js#L238)

@@ -657,3 +655,3 @@ Merge "partials" view types. This is necessary for template

### [.mergePartialsAsync](lib/plugins/context.js#L276)
### [.mergePartialsAsync](lib/plugins/context.js#L278)

@@ -867,3 +865,3 @@ Merge "partials" view types. This is necessary for template engines

### [setHelperOptions](lib/plugins/context.js#L114)
### [setHelperOptions](lib/plugins/context.js#L116)

@@ -878,3 +876,3 @@ Update context in a helper so that `this.helper.options` is

### [.mergePartials](lib/plugins/context.js#L236)
### [.mergePartials](lib/plugins/context.js#L238)

@@ -890,3 +888,3 @@ Merge "partials" view types. This is necessary for template

### [.mergePartialsAsync](lib/plugins/context.js#L276)
### [.mergePartialsAsync](lib/plugins/context.js#L278)

@@ -1114,3 +1112,3 @@ Merge "partials" view types. This is necessary for template engines

### [setHelperOptions](lib/plugins/context.js#L114)
### [setHelperOptions](lib/plugins/context.js#L116)

@@ -1125,3 +1123,3 @@ Update context in a helper so that `this.helper.options` is

### [.mergePartials](lib/plugins/context.js#L236)
### [.mergePartials](lib/plugins/context.js#L238)

@@ -1137,3 +1135,3 @@ Merge "partials" view types. This is necessary for template

### [.mergePartialsAsync](lib/plugins/context.js#L276)
### [.mergePartialsAsync](lib/plugins/context.js#L278)

@@ -1400,3 +1398,3 @@ Merge "partials" view types. This is necessary for template engines

### [setHelperOptions](lib/plugins/context.js#L114)
### [setHelperOptions](lib/plugins/context.js#L116)

@@ -1411,3 +1409,3 @@ Update context in a helper so that `this.helper.options` is

### [.mergePartials](lib/plugins/context.js#L236)
### [.mergePartials](lib/plugins/context.js#L238)

@@ -1423,3 +1421,3 @@ Merge "partials" view types. This is necessary for template

### [.mergePartialsAsync](lib/plugins/context.js#L276)
### [.mergePartialsAsync](lib/plugins/context.js#L278)

@@ -1615,3 +1613,3 @@ Merge "partials" view types. This is necessary for template engines

### [setHelperOptions](lib/plugins/context.js#L114)
### [setHelperOptions](lib/plugins/context.js#L116)

@@ -1626,3 +1624,3 @@ Update context in a helper so that `this.helper.options` is

### [.mergePartials](lib/plugins/context.js#L236)
### [.mergePartials](lib/plugins/context.js#L238)

@@ -1638,3 +1636,3 @@ Merge "partials" view types. This is necessary for template

### [.mergePartialsAsync](lib/plugins/context.js#L276)
### [.mergePartialsAsync](lib/plugins/context.js#L278)

@@ -1651,3 +1649,3 @@ Merge "partials" view types. This is necessary for template engines

### [.handle](lib/plugins/routes.js#L47)
### [.handle](lib/plugins/routes.js#L46)

@@ -1669,7 +1667,7 @@ Handle a middleware `method` for `view`.

### [.handleView](lib/plugins/routes.js#L112)
### [.handleView](lib/plugins/routes.js#L111)
Deprecated, use `.handleOnce`
### [.route](lib/plugins/routes.js#L162)
### [.route](lib/plugins/routes.js#L161)

@@ -1699,3 +1697,3 @@ Create a new Route for the given path. Each route contains a separate middleware stack.

### [.all](lib/plugins/routes.js#L184)
### [.all](lib/plugins/routes.js#L183)

@@ -1719,3 +1717,3 @@ Special route method that works just like the `router.METHOD()` methods, except that it matches all verbs.

### [.param](lib/plugins/routes.js#L213)
### [.param](lib/plugins/routes.js#L212)

@@ -1930,3 +1928,3 @@ Add callback triggers to route parameters, where `name` is the name of the parameter and `fn` is the callback function.

* adds a static `Templates.setup()` method for initializing any setup code that should have access to the instance before any other use code is run.
* upgrade to [base-data](https://github.com/jonschlinkert/base-data) v0.4.0, which adds `app.option.set`, `app.option.get` and `app.option.merge`
* upgrade to [base-data](https://github.com/node-base/base-data) v0.4.0, which adds `app.option.set`, `app.option.get` and `app.option.merge`

@@ -1996,6 +1994,6 @@ ### v0.14.0

* [assemble](https://www.npmjs.com/package/assemble): Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… [more](https://www.npmjs.com/package/assemble) | [homepage](https://github.com/assemble/assemble)
* [en-route](https://www.npmjs.com/package/en-route): Routing for static site generators, build systems and task runners, heavily based on express.js routes… [more](https://www.npmjs.com/package/en-route) | [homepage](https://github.com/jonschlinkert/en-route)
* [engine](https://www.npmjs.com/package/engine): Template engine based on Lo-Dash template, but adds features like the ability to register helpers… [more](https://www.npmjs.com/package/engine) | [homepage](https://github.com/jonschlinkert/engine)
* [layouts](https://www.npmjs.com/package/layouts): Wraps templates with layouts. Layouts can use other layouts and be nested to any depth.… [more](https://www.npmjs.com/package/layouts) | [homepage](https://github.com/doowb/layouts)
* [assemble](https://www.npmjs.com/package/assemble): Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… [more](https://www.npmjs.com/package/assemble) | [homepage](https://github.com/assemble/assemble)
* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://www.npmjs.com/package/verb) | [homepage](https://github.com/verbose/verb)

@@ -2043,2 +2041,2 @@

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 02, 2016._
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 07, 2016._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc