base-questions
Advanced tools
Comparing version 0.5.2 to 0.5.3
20
index.js
@@ -13,4 +13,4 @@ /*! | ||
module.exports = function(config) { | ||
return function(app) { | ||
if (this.isRegistered('base-questions')) return; | ||
return function plugin(app) { | ||
if (!isValidInstance(app)) return; | ||
@@ -141,3 +141,19 @@ var opts = utils.merge({project: this.project}, this.options, config); | ||
}); | ||
return plugin; | ||
}; | ||
}; | ||
function isValidInstance(app) { | ||
var fn = app.options.validatePlugin; | ||
if (typeof fn === 'function' && !fn(app)) { | ||
return false; | ||
} | ||
if (app.isRegistered('base-questions')) { | ||
return false; | ||
} | ||
if (app.isCollection || app.isView) { | ||
return false; | ||
} | ||
return true; | ||
} |
{ | ||
"name": "base-questions", | ||
"description": "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.", | ||
"version": "0.5.2", | ||
"homepage": "https://github.com/jonschlinkert/base-questions", | ||
"version": "0.5.3", | ||
"homepage": "https://github.com/node-base/base-questions", | ||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"repository": "jonschlinkert/base-questions", | ||
"repository": "node-base/base-questions", | ||
"bugs": { | ||
"url": "https://github.com/jonschlinkert/base-questions/issues" | ||
"url": "https://github.com/node-base/base-questions/issues" | ||
}, | ||
@@ -11,0 +11,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
# base-questions [![NPM version](https://img.shields.io/npm/v/base-questions.svg)](https://www.npmjs.com/package/base-questions) [![Build Status](https://img.shields.io/travis/jonschlinkert/base-questions.svg)](https://travis-ci.org/jonschlinkert/base-questions) | ||
# base-questions [![NPM version](https://img.shields.io/npm/v/base-questions.svg)](https://www.npmjs.com/package/base-questions) [![Build Status](https://img.shields.io/travis/node-base/base-questions.svg)](https://travis-ci.org/node-base/base-questions) | ||
@@ -203,6 +203,6 @@ > Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis. | ||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) | ||
Released under the [MIT license](https://github.com/jonschlinkert/base-questions/blob/master/LICENSE). | ||
Released under the [MIT license](https://github.com/node-base/base-questions/blob/master/LICENSE). | ||
*** | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 08, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 17, 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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
13638
170