Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed May 31, 2023
1 parent f0ed99a commit c480625
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 403 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ new Extension({
color1: "#0800ff",
blocks: [
{
opcode: 'output', /** @ts-ignore */
blockType: Scratch.BlockType.COMMAND,
opcode: 'output',
blockType: 'command',
text: '命令 [block:string] [type:string]',
default: { block : "参数2", type: "类型" },
menu: { block : [ "参数1", "参数2" ] },
bind: function({ block, type }) {
return `内容 ${block} 类型 ${type}`;
},
}, {
opcode: 'list', /** @ts-ignore */
blockType: Scratch.BlockType.REPORTER,
opcode: 'list',
blockType: 'reporter',
text: '获取一个空列表',
bind: () => [],
disableMonitor: true,
Expand Down Expand Up @@ -165,6 +165,7 @@ class Extension {
// @ts-ignore
Scratch.extensions.register(new Extension());
```
> turbowarp-clipx
```typescript
Expand All @@ -177,7 +178,7 @@ new Extension({
blocks: [
{
opcode: 'fetch',
blockType: Scratch.BlockType.REPORTER,
blockType: 'reporter',
text: 'fetch [uri:string] 方法[method:string]',
default: { uri: "https://example.com/" , method: "GET" },
menu: { method: ["GET", "POST", "PUT", "DELETE" ] },
Expand Down
11 changes: 6 additions & 5 deletions docs/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ new Extension({
color1: "#0800ff",
blocks: [
{
opcode: 'output', /** @ts-ignore */
blockType: Scratch.BlockType.COMMAND,
opcode: 'output',
blockType: 'command',
text: 'command [block:string] [type:string]',
default: { block : "param2", type: "type" },
menu: { block : [ "param1", "param2" ] },
bind: function({ block, type }) {
return `content ${block} type ${type}`;
},
}, {
opcode: 'list', /** @ts-ignore */
blockType: Scratch.BlockType.REPORTER,
opcode: 'list',
blockType: 'reporter',
text: 'Get an empty array',
bind: () => [],
disableMonitor: true,
Expand Down Expand Up @@ -164,6 +164,7 @@ class Extension {
// @ts-ignore
Scratch.extensions.register(new Extension());
```
> turbowarp-clipx
```typescript
Expand All @@ -176,7 +177,7 @@ new Extension({
blocks: [
{
opcode: 'fetch',
blockType: Scratch.BlockType.REPORTER,
blockType: 'reporter',
text: 'fetch [uri:string] method[method:string]',
default: { uri: "https://example.com/" , method: "GET" },
menu: { method: ["GET", "POST", "PUT", "DELETE" ] },
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-promise": "^6.0.0",
"ts-loader": "^9.4.2",
"typescript": "^5.0.3",
"webpack": "^5.77.0",
"webpack-cli": "^5.0.1"
"webpack": "^5.84.1",
"webpack-cli": "^5.1.1"
}
}
Loading

0 comments on commit c480625

Please sign in to comment.