This package has been deprecated

Author message:

Merged into d-pac.cms

keystone-dpac-plugins

1.0.5 • Public • Published

NPM version Build Status Dependency Status

Finds and prepares d-pac plugins for use in KeystoneJS

Installation

npm install --save keystone-dpac-plugins

Usage

// before `keystone.import( "models" );`
// (1) setup
var plugins = require("keystone-dpac-plugins");
plugins.register();
 
// in your models
// (2) plugin selection
var plugins = require("keystone-dpac-plugins");
 
MyModel.add({
    someField : {
        type    : Types.Select,
        options : plugins.list( "judge" )
    }
});
  1. This will parse your project's package.json and iterate over the dependencies, if it encounters a d-pac plugin module it will read out the relevant data and store it.
  2. It returns a list with usable plugins (of type "judge" in the above example), readily consumable by a keystone Select field.

Note: The plugin modules have NOT been required at this point and do not take up memory. The actual require'ing is left up to you.

Example

See comparative-selection plugin for an example of a keystone/d-pac plugin.

License

GPL v3 © d-pac

Readme

Keywords

Package Sidebar

Install

npm i keystone-dpac-plugins

Homepage

www.d-pac.be

Weekly Downloads

3

Version

1.0.5

License

GPL v3

Last publish

Collaborators

  • creynders