assemble-render-file
Advanced tools
Comparing version 0.6.1 to 0.7.0
17
index.js
@@ -28,7 +28,8 @@ /*! | ||
return function plugin(app) { | ||
if (!isValidInstance(this)) return; | ||
var opts = utils.merge({}, this.options, config); | ||
if (!utils.isValid(app)) return; | ||
var opts = utils.merge({}, app.options, config); | ||
var debug = utils.debug; | ||
this.define('renderFile', function(engine, locals) { | ||
app.define('renderFile', function(engine, locals) { | ||
if (typeof engine !== 'string') { | ||
@@ -120,11 +121,1 @@ locals = engine; | ||
} | ||
function isValidInstance(app) { | ||
if (app.isView || app.isItem) { | ||
return false; | ||
} | ||
if (app.isRegistered('assemble-render-file')) { | ||
return false; | ||
} | ||
return true; | ||
} |
{ | ||
"name": "assemble-render-file", | ||
"description": "Assemble plugin for rendering views in a vinyl pipeline.", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"homepage": "https://github.com/assemble/assemble-render-file", | ||
@@ -25,2 +25,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"debug": "^2.2.0", | ||
"is-registered": "^0.1.4", | ||
"is-valid-instance": "^0.1.0", | ||
"lazy-cache": "^2.0.1", | ||
@@ -27,0 +29,0 @@ "mixin-deep": "^1.1.3", |
@@ -60,3 +60,3 @@ # assemble-render-file [![NPM version](https://img.shields.io/npm/v/assemble-render-file.svg?style=flat)](https://www.npmjs.com/package/assemble-render-file) [![NPM downloads](https://img.shields.io/npm/dm/assemble-render-file.svg?style=flat)](https://npmjs.org/package/assemble-render-file) [![Build Status](https://img.shields.io/travis/assemble/assemble-render-file.svg?style=flat)](https://travis-ci.org/assemble/assemble-render-file) | ||
* [assemble-loader](https://www.npmjs.com/package/assemble-loader): Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with… [more](https://www.npmjs.com/package/assemble-loader) | [homepage](https://github.com/jonschlinkert/assemble-loader) | ||
* [assemble-loader](https://www.npmjs.com/package/assemble-loader): Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with… [more](https://www.npmjs.com/package/assemble-loader) | [homepage](https://github.com/assemble/assemble-loader) | ||
* [assemble-streams](https://www.npmjs.com/package/assemble-streams): Assemble pipeline plugin for pushing a view collection into a vinyl stream. | [homepage](https://github.com/assemble/assemble-streams) | ||
@@ -107,2 +107,2 @@ * [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) | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 24, 2016._ |
17
utils.js
@@ -10,2 +10,9 @@ 'use strict'; | ||
require = utils; | ||
/** | ||
* Utils | ||
*/ | ||
require('is-registered'); | ||
require('is-valid-instance'); | ||
require('mixin-deep', 'merge'); | ||
@@ -17,2 +24,12 @@ require('through2', 'through'); | ||
utils.isValid = function(app) { | ||
if (!utils.isValidInstance(app, ['app', 'views', 'collection'])) { | ||
return false; | ||
} | ||
if (utils.isRegistered(app, 'assemble-render-file')) { | ||
return false; | ||
} | ||
return true; | ||
}; | ||
/** | ||
@@ -19,0 +36,0 @@ * Expose `utils` |
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
10101
128
6
+ Addedis-registered@^0.1.4
+ Addedis-valid-instance@^0.1.0
+ Addeddefine-property@0.2.5(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.7(transitive)
+ Addedis-registered@0.1.5(transitive)
+ Addedis-valid-instance@0.1.0(transitive)
+ Addedisobject@2.1.0(transitive)
+ Addedpascalcase@0.1.1(transitive)