PluginLoader Class
The Plugin Loader class
Constructor
PluginLoader
()
Methods
constructor
-
opts
Constructor method
Parameters:
-
opts
Object-
docpad
ObjectThe docpad instance that we are loading plugins for
-
dirPath
StringThe directory path of the plugin
-
BasePlugin
ObjectThe base plugin class
-
create
-
config
-
next
Create an instance of a plugin defined by the passed config. The plugin instance is returned in the passed callback. next(err,pluginInstance)
Parameters:
-
config
Object -
next
Function
exists
-
next
Loads the package.json file and extracts the main path next(err,exists)
Parameters:
-
next
Function
install
-
next
Installs the plugins node modules. next(err)
Parameters:
-
next
Function
load
-
next
Load in the pluginClass from the plugin file. The plugin class that has been loaded is returned in the passed callback next(err,pluginClass)
Parameters:
-
next
Function
unsupported
-
next
Check if this plugin is unsupported Boolean value returned as a parameter in the passed callback next(err,supported)
Parameters:
-
next
Function
Properties
docpad
Object
private
The DocPad Instance
The BasePlugin Class
The full path of the plugin's directory
The full path of the plugin's package.json file
The parsed contents of the plugin's package.json file
The full path of the plugin's main file
The parsed content of the plugin's main file
The plugin name
The plugin version
Node modules path