Comparing version
'use strict'; | ||
var path = require('path'); | ||
var utils = require('./utils'); | ||
@@ -31,3 +30,3 @@ | ||
* @param {Object} `layouts` Object of layout objects. | ||
* @param {Object} `options` Optionally define a `defaultLayout` (string), pass custom delimiters (`layoutDelims`) to use as the placeholder for the content insertion point, or change the name of the placeholder tag with the `tag` option. | ||
* @param {Object} `options` Optionally define a `defaultLayout` (string), pass custom delimiters (`layoutDelims`) to use as the placeholder for the content insertion point, or change the name of the placeholder tag with the `contentTag` option. | ||
* @param {Function} `fn` Optionally pass a function to modify the context as each layout is applied. | ||
@@ -73,3 +72,3 @@ * @return {String} Returns the original string wrapped with one or more layouts. | ||
var data = {}; | ||
var tag = opts.tag || 'body'; | ||
var tag = opts.contentTag || 'body'; | ||
data[tag] = str; | ||
@@ -259,3 +258,2 @@ | ||
/** | ||
@@ -262,0 +260,0 @@ * Return true if the given value is a buffer |
{ | ||
"name": "layouts", | ||
"description": "Wraps templates with layouts. Layouts can use other layouts and be nested to any depth. This can be used 100% standalone to wrap any kind of file with banners, headers or footer content. Use for markdown, HTML, handlebars views, lo-dash templates, etc. Layouts can also be vinyl files.", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"homepage": "https://github.com/doowb/layouts", | ||
@@ -30,13 +30,12 @@ "author": "Brian Woodward (https://github.com/doowb)", | ||
"get-view": "^0.1.1", | ||
"lazy-cache": "^1.0.3" | ||
"lazy-cache": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"gulp": "^3.9.0", | ||
"gulp-eslint": "^1.1.1", | ||
"gulp-format-md": "^0.1.5", | ||
"gulp-istanbul": "^0.10.0", | ||
"gulp-mocha": "^2.1.3", | ||
"lodash": "^3.10.0", | ||
"mocha": "*", | ||
"should": "*", | ||
"gulp": "^3.9.1", | ||
"gulp-eslint": "^3.0.1", | ||
"gulp-format-md": "^0.1.9", | ||
"gulp-istanbul": "^1.0.0", | ||
"gulp-mocha": "^2.2.0", | ||
"lodash": "^4.13.1", | ||
"mocha": "^2.5.3", | ||
"to-vinyl": "^0.2.0" | ||
@@ -92,2 +91,10 @@ }, | ||
"verb": { | ||
"toc": true, | ||
"layout": "default", | ||
"tasks": [ | ||
"readme" | ||
], | ||
"plugins": [ | ||
"gulp-format-md" | ||
], | ||
"related": { | ||
@@ -104,10 +111,11 @@ "list": [ | ||
}, | ||
"plugins": [ | ||
"gulp-format-md" | ||
"reflinks": [ | ||
"vinyl", | ||
"verb-generate-readme", | ||
"verb" | ||
], | ||
"layout": "default", | ||
"reflinks": [ | ||
"vinyl" | ||
] | ||
"lint": { | ||
"reflinks": true | ||
} | ||
} | ||
} |
17645
11.47%8
-11.11%218
11.22%240
-0.41%+ Added
+ Added
+ Added
- Removed
Updated