webcheck-plugin-group
v1.0.0
Published
Manage groups of webcheck plugins
Downloads
11
Readme
webcheck-plugin-group
Manage groups of webcheck plugins.
How to install
npm install --save webcheck-plugin-group
How to use
var Webcheck = require('webcheck');
var PluginGroup = require('webcheck-plugin-group');
var AnyPlugin = require('webcheck-any-plugin');
var firstPlugin = new AnyPlugin();
var secondPlugin = new AnyPlugin();
var thirdPlugin = new AnyPlugin();
var group = PluginGroup({
plugins: [secondPlugin]
});
group.plugins.push(thirdPlugin);
group.plugins.unshift(firstPlugin);
var webcheck = new Webcheck();
webcheck.addPlugin(group); // Register all plugins in group
group.enable(); // Enable all plugins in group in correct order
// group.disable(); // Disable all plugins in group
Options
plugins
: Array of plugins.