Skip to content

Commit

Permalink
docs: update docs for blocklet sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
linchen1987 committed Jul 11, 2023
1 parent b78166b commit fd393b2
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 13 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.134 (July 11, 2023)

- docs: update docs for blocklet sdk

## 0.1.133 (June 29, 2023)

- docs: update docs for "develop component"
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.133
version: 0.1.134
logo: logo.png
files:
- hooks/post-start.js
Expand Down
13 changes: 12 additions & 1 deletion developer/docs/pages/reference/blocklet-sdk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ const {
appName, // the title of the app, used to display to user
appDescription, // the description of the app
appUrl, // the web url of the app
isComponent, // the blocklet is running as an app or a component
dataDir, // the data dir of the blocklet
cacheDir, // the cache dir of the blocklet
mode, // in which mode the blocklet is running
Expand Down Expand Up @@ -519,6 +518,18 @@ import { env, components } from '@blocklet/config'
```

- `env` same as env in Environment
- `appId` the did of the app
- `appPid` the permenant did of the app
- `appIds` all did's that the application has previously used
- `appName` the title of the app, used to display to user
- `appDescription` the description of the app
- `appUrl` the web url of the app
- `dataDir` the data dir of the blocklet
- `cacheDir` the cache dir of the blocklet
- `mode` in which mode the blocklet is running
- `appStorageEndpoint` the endpoint of the DID Spaces of the app
- `serverVersion` the version of the server where the app is running
- `preferences` blocklet preferences. default: {}
- `components` **Array\<object\>**
- `title` component title
- `did` component did
Expand Down
25 changes: 18 additions & 7 deletions developer/docs/pages/reference/blocklet-sdk/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,12 @@ const {
appName, // 应用名称,用于显示给用户
appDescription, // 应用描述,用于显示给用户
appUrl, // 应用的的访问地址
isComponent, // Blocklet 当前作为应用运行还是作为组件运行
dataDir, // Blocklet 数据存放目录
cacheDir, // Blocklet 缓存数据路径
mode, // Blocklet 以什么模式运行
appStorageEndpoint // 应用运行所在server的版本
serverVersion: // 应用绑定的 DID Space 的 endpoint
preferences, // Blocklet 的偏好设置。默认值: {}
dataDir, // 组件 数据存放目录
cacheDir, // 组件 缓存数据路径
mode, // 组件 以什么模式运行
appStorageEndpoint // 应用绑定的 DID Space 的 endpoint
serverVersion: // 应用运行所在server的版本
preferences, // 应用的偏好设置。默认值: {}
} = env;
```

Expand All @@ -519,6 +518,18 @@ import { env, components } from '@blocklet/config'
```

- `env` Environment 中的 env 相同
- `appId` 应用 DID
- `appPid` 应用永久 DID
- `appIds` 应用曾使用过的所有 DID
- `appName` 应用名称,用于显示给用户
- `appDescription` 应用描述,用于显示给用户
- `appUrl` 应用的的访问地址
- `dataDir` Blocklet 数据存放目录
- `cacheDir` Blocklet 缓存数据路径
- `mode` Blocklet 以什么模式运行
- `appStorageEndpoint` 应用绑定的 DID Space 的 endpoint
- `serverVersion` 应用运行所在server的版本
- `preferences` 应用 的偏好设置。默认值: {}
- `components` **Array\<object\>**
- `title` 组件名称
- `did` 组件 DID
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.133
version: 0.1.134
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.133
0.1.134
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.133
version: 0.1.134
logo: logo.png
files: []
interfaces:
Expand Down
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.133
version: 0.1.134
logo: logo.png
files: []
interfaces:
Expand Down

0 comments on commit fd393b2

Please sign in to comment.