Comparing version 0.1.4 to 0.1.5
18
index.js
@@ -14,5 +14,3 @@ /*! | ||
return function plugin() { | ||
fn = fn || this.options.validatePlugin; | ||
if (typeof fn === 'function' && !fn(this)) return; | ||
if (this.isRegistered('base-cwd')) return; | ||
if (!isValidInstance(this, fn)) return; | ||
@@ -39,1 +37,15 @@ Object.defineProperty(this, 'cwd', { | ||
}; | ||
function isValidInstance(app, fn) { | ||
fn = fn || app.options.validatePlugin; | ||
if (typeof fn === 'function' && !fn(app)) { | ||
return false; | ||
} | ||
if (app.isRegistered('base-cwd')) { | ||
return false; | ||
} | ||
if (app.isCollection || app.isView) { | ||
return false; | ||
} | ||
return true; | ||
} |
{ | ||
"name": "base-cwd", | ||
"description": "Base plugin that adds a getter/setter for the current working directory.", | ||
"version": "0.1.4", | ||
"homepage": "https://github.com/jonschlinkert/base-cwd", | ||
"version": "0.1.5", | ||
"homepage": "https://github.com/node-base/base-cwd", | ||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"repository": "jonschlinkert/base-cwd", | ||
"repository": "node-base/base-cwd", | ||
"bugs": { | ||
"url": "https://github.com/jonschlinkert/base-cwd/issues" | ||
"url": "https://github.com/node-base/base-cwd/issues" | ||
}, | ||
@@ -11,0 +11,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
# base-cwd [![NPM version](https://img.shields.io/npm/v/base-cwd.svg)](https://www.npmjs.com/package/base-cwd) [![Build Status](https://img.shields.io/travis/jonschlinkert/base-cwd.svg)](https://travis-ci.org/jonschlinkert/base-cwd) | ||
# base-cwd [![NPM version](https://img.shields.io/npm/v/base-cwd.svg)](https://www.npmjs.com/package/base-cwd) [![Build Status](https://img.shields.io/travis/node-base/base-cwd.svg)](https://travis-ci.org/node-base/base-cwd) | ||
@@ -87,3 +87,3 @@ > Base plugin that adds a getter/setter for the current working directory. | ||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) | ||
Released under the [MIT license](https://github.com/jonschlinkert/base-cwd/blob/master/LICENSE). | ||
Released under the [MIT license](https://github.com/node-base/base-cwd/blob/master/LICENSE). | ||
@@ -90,0 +90,0 @@ *** |
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 bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6480
43
1
1