docvy-plugin-installer
Installs plugins for the Docvy Application
installation:
⇒ npm install docvy-plugin-installer
usage:
This component may be used programmatically, as in the docvy application, or from the terminal as a stand-alone application.
terminal usage:
Help information for terminal usage:
⇒ docvy-plugins help
docvy-plugins: The Docvy Plugin Installer
dir-install <dirpath> install plugin from <dirpath>
help show this help information
install <plugin> install <plugin>
list list installed plugins
npm-install <plugin> install <plugin> from NPM
uninstall <plugin> uninstall <plugin>
version show version information
See https://github.com/docvy/plugin-installer for feature-requests and bug-reports
API:
var installer = require("docvy-installer");
installer.install(names [, callback])
The installer defaults to installing from NPM. See installer.npmInstall for more information.
installer.npmInstall(names [, callback])
Installs new plugins from NPM. Plugin MUST be available through npm.
names
(Array[String]): array of names of the plugins to installcallback
(Function):
installer.dirInstall(dirpath [, callback])
Installs plugin from directory at dirpath
.
dirpath
(String): path to the directory holding the plugins contentcallback
(Function):
installer.uninstall(names [, callback])
Uninstalls a plugins from the Plugins directory.
names
(Array[String]): array of names of plugins to uninstallcallback
(Function):
- signature:
callback(err)
- On success,
err
will be null
- On error,
err
will be an Error
object
installer.listPlugins([callback])
Lists all the installed plugins
callback
(Function):
- signature:
callback(err, pluginsInfo)
- On success,
err
will be null
and pluginsInfo
will be an array of plugins descriptors - On error,
err
will be an Error
object and pluginsInfo
be null
plugin descriptor
Describes a plugin.
Example [Schema Reference]:
{
"name": "dp-markdown",
"version": "1.0.0",
"author": {
"name": "GochoMugo",
"email": "mugo@forfuture.co.ke"
},
"icon": "icon128.png",
"homepage": "https://github.com/docvy/dp-markdown"
}
license:
The MIT License (MIT)
Copyright (c) 2015 Forfuture LLC we@forfuture.co.ke
Copyright (c) 2015 GochoMugo mugo@forfuture.co.ke