Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Commit

Permalink
Update docs for v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Heejin committed Apr 30, 2016
1 parent 9be1cbb commit 4e2bdf9
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/package-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ All plugin configurations must be located in package.json
- `group` String - Default result group name (optional, default is `name` value)

**And...**
* `keywords` Array\<String\> - Add Base API version `hain-0.1.0` for sharing your plugin (**required**)
* `keywords` Array\<String\> - Add Base API version `hain-0.3.0` for sharing your plugin (**required**)



Expand All @@ -23,7 +23,7 @@ All plugin configurations must be located in package.json
"name": "hain-plugin-google",
"version": "0.0.1",
"keywords": [
"hain-0.1.0"
"hain-0.3.0"
],
"hain": {
"prefix": "/g",
Expand Down
20 changes: 13 additions & 7 deletions docs/plugin-context-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@ App object has following functions:
* **quit()**

Quit the app


* **open(query)**
- `query` String - Query text (optional, default is `undefined`)

Open the window with new Query

* **close(dontRestoreFocus)**
- `dontRestoreFocus` Boolean - if true, Hain doesn't focus previous focused window (optional, default is `false`)

Close the open window
Close the window

* **setInput(text)**
- `text` String - New input(query) (**required**)
* **setQuery(query)**
- `query` String - Query text (**required**)

Change user input (similar with `redirect` property in `SearchResult`)

* **openPreferences()**
Change query (similar with `redirect` property in `SearchResult`)

* **openPreferences(prefId)**
- `prefId` String - Opening Preferences Id (PackageName for Plugin) (optional, default is `undefined`)

Open preferences window

**Example**
Expand Down
1 change: 1 addition & 0 deletions docs/plugin-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PluginContext is a object which has following properties:
* `toast` [Toast](plugin-context-toast.md) - Provides toast functionality
* `shell` [Shell](plugin-context-shell.md) - Provides electron's shell commands
* `logger` [Logger](plugin-context-logger.md) - Provides logging functionality
* `localStorage` [node-persist Object](https://github.com/simonlast/node-persist) - Provides a storage for each plugins

**Preference Objects:**
* `globalPreferences` [PreferencesObject](preferences-object.md) - Contains Global preferences
Expand Down
8 changes: 3 additions & 5 deletions docs/plugin-docs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Plugin Documentation (working)

Current API Version: `hain-0.1.0`
Current API Version: `hain-0.3.0`

## Examples

Expand Down Expand Up @@ -37,7 +37,6 @@ Current API Version: `hain-0.1.0`
## Guides

* [Plugin Directories](plugin-directories.md)
* Run your plugins
* [Share your plugins](share-your-plugins.md)

## API Reference
Expand All @@ -56,6 +55,5 @@ Current API Version: `hain-0.1.0`
* [Icon URL Format](icon-url-format.md)
* [Text Format](text-format.md)

## Very Important Notice

* You should avoid to use `console.log` in your plugin or plugin process would be break. Instead, you can use `PluginContext.Logger`. (for unknown reason)
## Known Issues
- You should avoid to use `console.log` in your plugin or plugin process would be break. Instead, you can use `PluginContext.Logger`. (for unknown reason)
27 changes: 26 additions & 1 deletion docs/preferences-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,36 @@ module.exports = (pluginContext) => {
```
See [PreferencesObject](preferences-object.md)

## Non-Standard Options

* **errorMessages**
You can customize displaying error messages to what you want

**Example**
```json
{
"type": "string",
"minLength": 3,
"errorMessages": "This is error!"
}
```
or
```json
{
"type": "string",
"minLength": 3,
"maxLength": 5,
"errorMessages": {
"minLength": "This is Error for minLength",
"maxLength": "This is Error for maxLength"
}
}
```

## Limitations
Currently, Type of root object must be `object`.



## Related Docs
* [Plugin Skeleton](plugin-skeleton.md)
* [PreferencesObject](preferences-object.md)

0 comments on commit 4e2bdf9

Please sign in to comment.