Skip to content

Commit 70f56b8

Browse files
author
ColinTree
committed
Added README.md
1 parent 5866a1a commit 70f56b8

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# gitbook-plugin-ai2-blocks
2+
3+
A plugin for gitbook, allowing create blocks through blockly with a piece of text.
4+
5+
It is actually creating workspace for each block, and then resize the workspace so that it just fits size the block.
6+
7+
## Plugin Config
8+
9+
* **text_when** text `when` for events
10+
* **text_do** text `do` for events
11+
* **text_call** text `call` for methods
12+
* **text_set** text `set` for properties
13+
14+
e.g.
15+
16+
```
17+
{
18+
"author": "Colintree <502470184@qq.com>",
19+
"plugins": [
20+
"ai2-blocks@git+https://github.com/ColinTree/gitbook-plugin-ai2-blocks.git#1.0.0"
21+
],
22+
"pluginsConfig": {
23+
"ai2-blocks": {
24+
"text_when": "when",
25+
"text_do": "do",
26+
"text_call": "call",
27+
"text_set": "set"
28+
}
29+
}
30+
}
31+
```
32+
33+
## How to use / Example
34+
35+
```markdown
36+
# test
37+
38+
{% Ai2Method %}{"name":"MethodName", "componentName":"compName1", "arg":["arg1","arg2"]}{% endAi2Method %}
39+
40+
{% Ai2Event %}{"name":"EventName", "componentName":"compName2", "arg":["arg1","arg2"]}{% endAi2Event %}
41+
42+
{% Ai2Property %}{"name":"PropertyName", "componentName":"compName3", "getter":true}{% endAi2Property %}
43+
44+
{% Ai2Property %}{"name":"PropertyName", "componentName":"compName4", "getter":false}{% endAi2Property %}
45+
```
46+
47+
will be converted into:
48+
49+
![](example.png)
50+
51+
## Further Plan
52+
53+
* allowing scaling blocks

example.png

16.3 KB
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
"description": "text \"set\" for properties"
4545
}
4646
}
47-
}
47+
},
48+
"readme": "README.md"
4849
}

0 commit comments

Comments
 (0)