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.1.19 to 0.1.20

1

lib/group.js

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

var keys = Object.keys(List.prototype);
keys.forEach(function(key) {

@@ -34,0 +35,0 @@ if (typeof res[key] !== 'undefined') return;

2

lib/views.js

@@ -76,3 +76,3 @@ 'use strict';

Views.prototype.use = function(fn) {
var plugin = fn.call(this, this);
var plugin = fn.call(this, this, this.options);
if (typeof plugin === 'function') {

@@ -79,0 +79,0 @@ this.plugins.push(plugin);

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

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

@@ -5,2 +5,51 @@ # templates [![NPM version](https://badge.fury.io/js/templates.svg)](http://badge.fury.io/js/templates)

**Features**
* create custom view collections using `app.create('foo')`
* register any template engine for rendering views
* register helpers
* partial support
* plugins and middleware
**Example**
This is just a very small glimpse at the `templates` API!
```js
var templates = require('templates');
var app = templates();
// create a collection
app.create('pages');
// add views to the collection
app.page('a.html', {content: 'this is <%= foo %>'});
app.page('b.html', {content: 'this is <%= bar %>'});
app.page('c.html', {content: 'this is <%= baz %>'});
app.pages.getView('a.html')
.render({foo: 'home'}, function (err, view) {
//=> 'this is home'
});
```
<!-- toc -->
* [Install](#install)
* [Usage](#usage)
* [API](#api)
- [Collections](#collections)
- [List](#list)
- [View](#view)
- [Related projects](#related-projects)
- [Running tests](#running-tests)
- [Contributing](#contributing)
- [Author](#author)
- [License](#license)
_(Table of contents generated by [verb](https://github.com/verbose/verb))_
<!-- tocstop -->
## Install

@@ -7,0 +56,0 @@

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