.verb.md

March 24, 2017 ยท View on GitHub

Usage

var isValid = require('{%= name %}');

// in your Base plugin
function plugin(app) {
  // plugin name is required as the second argument
  if (!isValid(app, 'my-plugin')) return;
  // do plugin stuff
}

Optionally pass an array of instance types as the third argument:

function plugin(app) {
  if (!isValid(app, 'my-plugin', ['view', 'collection'])) return;
  // do plugin stuff
}

Visit [base][] for more details.

History

v0.3.0

  • upgrades [is-valid-instance][] to v0.3.0, which adds support for checking app.type for the instance type. We don't expect any regressions, but if you experience one, please create an issue.