package.json Format
Hain plugin is just a nodejs module.
All plugin configurations must be located in package.json
nameString - Plugin name, must be prefixed withhain-plugin-(required)authorString or Object - Name of Plugin Author (required)versionString - Plugin version ‘x.y.z’ (required)dependenciesArray - If your plugin has external dependencies, include them here. (required if applicable)hainObject - (required)prefixString - Plugin command prefix which starts with one of?@=\/#, e.g. ‘/g’ (required)usageString - Plugin usage to be displayed in the empty ResultList. e.g. ‘type /g’ (optional, default isprefixvalue)iconString - Icon URL, see Icon URL Format (required)redirectString - Query to redirect user input when user did select intro help (optional)groupString - Default result group name (optional, default isnamevalue)
And…
keywordsArray<String> - Add Base API versionhain-0.6.0for sharing your plugin (required)
Example
- package.json
{
"name": "hain-plugin-google",
"author": "Heejin Lee",
"version": "0.0.1",
"keywords": [
"hain-0.6.0"
],
"hain": {
"prefix": "/g",
"usage": "type /g something to google it",
"icon": "#fa fa-google",
"redirect": "/g "
}
}