Skip to content

Commit 4e2bdf9

Browse files
author
Heejin
committed
Update docs for v0.3.0
1 parent 9be1cbb commit 4e2bdf9

5 files changed

+45
-15
lines changed

docs/package-json-format.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ All plugin configurations must be located in package.json
1313
- `group` String - Default result group name (optional, default is `name` value)
1414

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

1818

1919

@@ -23,7 +23,7 @@ All plugin configurations must be located in package.json
2323
"name": "hain-plugin-google",
2424
"version": "0.0.1",
2525
"keywords": [
26-
"hain-0.1.0"
26+
"hain-0.3.0"
2727
],
2828
"hain": {
2929
"prefix": "/g",

docs/plugin-context-app.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,25 @@ App object has following functions:
77
* **quit()**
88

99
Quit the app
10-
10+
11+
* **open(query)**
12+
- `query` String - Query text (optional, default is `undefined`)
13+
14+
Open the window with new Query
15+
1116
* **close(dontRestoreFocus)**
1217
- `dontRestoreFocus` Boolean - if true, Hain doesn't focus previous focused window (optional, default is `false`)
1318

14-
Close the open window
19+
Close the window
1520

16-
* **setInput(text)**
17-
- `text` String - New input(query) (**required**)
21+
* **setQuery(query)**
22+
- `query` String - Query text (**required**)
1823

19-
Change user input (similar with `redirect` property in `SearchResult`)
20-
21-
* **openPreferences()**
24+
Change query (similar with `redirect` property in `SearchResult`)
2225

26+
* **openPreferences(prefId)**
27+
- `prefId` String - Opening Preferences Id (PackageName for Plugin) (optional, default is `undefined`)
28+
2329
Open preferences window
2430

2531
**Example**

docs/plugin-context.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PluginContext is a object which has following properties:
1616
* `toast` [Toast](plugin-context-toast.md) - Provides toast functionality
1717
* `shell` [Shell](plugin-context-shell.md) - Provides electron's shell commands
1818
* `logger` [Logger](plugin-context-logger.md) - Provides logging functionality
19+
* `localStorage` [node-persist Object](https://github.com/simonlast/node-persist) - Provides a storage for each plugins
1920

2021
**Preference Objects:**
2122
* `globalPreferences` [PreferencesObject](preferences-object.md) - Contains Global preferences

docs/plugin-docs.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Plugin Documentation (working)
22

3-
Current API Version: `hain-0.1.0`
3+
Current API Version: `hain-0.3.0`
44

55
## Examples
66

@@ -37,7 +37,6 @@ Current API Version: `hain-0.1.0`
3737
## Guides
3838

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

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

59-
## Very Important Notice
60-
61-
* 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)
58+
## Known Issues
59+
- 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)

docs/preferences-json-format.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,36 @@ module.exports = (pluginContext) => {
5858
```
5959
See [PreferencesObject](preferences-object.md)
6060

61+
## Non-Standard Options
62+
63+
* **errorMessages**
64+
You can customize displaying error messages to what you want
65+
66+
**Example**
67+
```json
68+
{
69+
"type": "string",
70+
"minLength": 3,
71+
"errorMessages": "This is error!"
72+
}
73+
```
74+
or
75+
```json
76+
{
77+
"type": "string",
78+
"minLength": 3,
79+
"maxLength": 5,
80+
"errorMessages": {
81+
"minLength": "This is Error for minLength",
82+
"maxLength": "This is Error for maxLength"
83+
}
84+
}
85+
```
86+
6187
## Limitations
6288
Currently, Type of root object must be `object`.
6389

6490

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

0 commit comments

Comments
 (0)