mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 12:53:13 +03:00
0238909281
Implements basic functionality described in #227 for loading plugins from a specific directory and having a specific workflow with an init() method and a disable() method.
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
|
|
var GhostPlugin;
|
|
|
|
/**
|
|
* GhostPlugin is the base class for a standard plugin.
|
|
* @class
|
|
* @parameter {Ghost} The current Ghost app instance
|
|
*/
|
|
GhostPlugin = function (ghost) {
|
|
this.app = ghost;
|
|
};
|
|
|
|
/**
|
|
* A method that will be called on installation.
|
|
* Can optionally return a promise if async.
|
|
* @parameter {Ghost} The current Ghost app instance
|
|
*/
|
|
GhostPlugin.prototype.install = function (ghost) {
|
|
return;
|
|
};
|
|
|
|
/**
|
|
* A method that will be called on uninstallation.
|
|
* Can optionally return a promise if async.
|
|
* @parameter {Ghost} The current Ghost app instance
|
|
*/
|
|
GhostPlugin.prototype.uninstall = function (ghost) {
|
|
return;
|
|
};
|
|
|
|
/**
|
|
* A method that will be called when the plugin is enabled.
|
|
* Can optionally return a promise if async.
|
|
* @parameter {Ghost} The current Ghost app instance
|
|
*/
|
|
GhostPlugin.prototype.activate = function (ghost) {
|
|
return;
|
|
};
|
|
|
|
/**
|
|
* A method that will be called when the plugin is disabled.
|
|
* Can optionally return a promise if async.
|
|
* @parameter {Ghost} The current Ghost app instance
|
|
*/
|
|
GhostPlugin.prototype.deactivate = function (ghost) {
|
|
return;
|
|
};
|
|
|
|
module.exports = GhostPlugin;
|
|
|