Skip to content

Commit

Permalink
docs: update docs for "develop component"
Browse files Browse the repository at this point in the history
  • Loading branch information
linchen1987 committed Jun 29, 2023
1 parent cc5ff8c commit b78166b
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.133 (June 29, 2023)

- docs: update docs for "develop component"

## 0.1.132 (June 28, 2023)

- docs: update docs for blocklet sdk
Expand Down
2 changes: 1 addition & 1 deletion developer/docs/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository:
type: git
url: git+https://github.com/blocklet/blocklet-site.git
specVersion: 1.2.8
version: 0.1.132
version: 0.1.133
logo: logo.png
files:
- hooks/post-start.js
Expand Down
4 changes: 2 additions & 2 deletions developer/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "blocklet dev",
"dev:child": "blocklet dev --component --app-did=z8iZrq2YrLLWUz6X77bfFL4wBfZuEfXuj1R2m --mount-point=/docs",
"dev:child": "blocklet dev --app-did=z8iZrq2YrLLWUz6X77bfFL4wBfZuEfXuj1R2m --mount-point=/docs",
"start": "xmark start",
"build": "xmark build",
"clean": "rm -rf .blocklet",
Expand All @@ -18,4 +18,4 @@
"@xmark/theme-docs": "^2.4.90"
},
"version": "0.1.67"
}
}
19 changes: 16 additions & 3 deletions developer/docs/pages/how-to/component/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ This article describes how to develop a Blocklet component. For how to develop a

## Develop a component

The way to develop a component is basically the same as [Develop an application](/how-to/develop), when developing a component, you need to add `--app-id` and optional `--mount-point` parameters to the `blocklet dev` command
The way to develop a component is basically the same as [Develop an application](/how-to/develop), when developing a component, you need to add `--app-did` and optional `--mount-point` parameters to the `blocklet dev` command

`blocklet dev --app-id <blocklet-app-id> --mount-point /xxx`
`blocklet dev --app-did <blocklet-app-did> --mount-point /xxx`

`blocklet-app-id` can be viewed in the blocklet details page
or

`BLOCKLET_DEV_APP_DID=<blocklet-app-did> BLOCKLET_DEV_MOUNT_POINT=/xxx blocklet dev`

or

1. config in `.env`
```
BLOCKLET_DEV_APP_DID=<blocklet-app-did>
BLOCKLET_DEV_MOUNT_POINT=/xxx
```
2. `blocklet dev`

> `blocklet-app-did` can be viewed in the blocklet details page
## Component Mount Point

Expand Down
19 changes: 16 additions & 3 deletions developer/docs/pages/how-to/component/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ layout: documentation

## 开发组件

开发组件和 [开发应用](/how-to/develop) 的方式基本相同,在开发组件时,需要为 `blocklet dev` 命令添加 `--app-id` 和 可选的 `--mount-point` 参数
开发组件和 [开发应用](/how-to/develop) 的方式基本相同,在开发组件时,需要为 `blocklet dev` 命令添加 `--app-did` 和 可选的 `--mount-point` 参数

`blocklet dev --app-id <blocklet-app-id> --mount-point /xxx`
`blocklet dev --app-did <blocklet-app-did> --mount-point /xxx`

`blocklet-app-id` 可在 blocklet 详情页中查看

`BLOCKLET_DEV_APP_DID=<blocklet-app-did> BLOCKLET_DEV_MOUNT_POINT=/xxx blocklet dev`


1.`.env` 中配置
```
BLOCKLET_DEV_APP_DID=<blocklet-app-did>
BLOCKLET_DEV_MOUNT_POINT=/xxx
```
2. `blocklet dev`

> `blocklet-app-did` 可在 blocklet 详情页中查看
## 组件挂载点

Expand Down
2 changes: 1 addition & 1 deletion developer/pages/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository:
type: git
url: git+https://github.com/blocklet/blocklet-site.git
specVersion: 1.2.8
version: 0.1.132
version: 0.1.133
logo: logo.png
files: []
interfaces:
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.132
0.1.133
2 changes: 1 addition & 1 deletion website/docs/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository:
type: git
url: git+https://github.com/blocklet/blocklet-site.git
specVersion: 1.2.8
version: 0.1.132
version: 0.1.133
logo: logo.png
files: []
interfaces:
Expand Down
4 changes: 2 additions & 2 deletions website/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "blocklet dev",
"dev:child": "blocklet dev --component --app-did=z8iZygFaH6jotsW1Td8CXSYSdQst2GJL9cGZA --mount-point=/docs",
"dev:child": "blocklet dev --app-did=z8iZygFaH6jotsW1Td8CXSYSdQst2GJL9cGZA --mount-point=/docs",
"start": "xmark start",
"build": "xmark build",
"clean": "rm -rf .blocklet",
Expand All @@ -17,4 +17,4 @@
"@xmark/theme-docs": "^2.4.90"
},
"version": "0.1.67"
}
}
2 changes: 1 addition & 1 deletion website/pages/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository:
type: git
url: git+https://github.com/blocklet/blocklet-site.git
specVersion: 1.2.8
version: 0.1.132
version: 0.1.133
logo: logo.png
files: []
interfaces:
Expand Down

0 comments on commit b78166b

Please sign in to comment.