docs: some minor doc optimizations

This commit is contained in:
JackLian 2022-12-14 11:18:54 +08:00 committed by 林熠
parent 778ba32a14
commit 546017d203
8 changed files with 78 additions and 15 deletions

View File

@ -3,9 +3,39 @@ title: API 总览
sidebar_position: 0
---
引擎直接提供 9 大类 API以及若干间接的 API具体如下图
引擎提供的公开 API 分为`命名空间``模型`两类,其中`命名空间`用于聚合一大类的 API`模型`为各 API 涉及到的对象模型。
### 命名空间
引擎直接提供以下几大类 API
- skeleton 面板 API
- material 物料 API
- project 模型 API
- simulator-host 模拟器 API
- hotkey 快捷键 API
- setters 设置器 API
- event 事件 API
- config 配置 API
- common 通用 API
- logger 日志 API
- init 初始化 API
### 模型
以下模型通过前面的 API 以返回值等形式间接透出。
- document-model 文档
- node 节点
- node-children 节点孩子
- props 属性集
- prop 属性
- setting-prop-entry 设置属性
- setting-top-entry 设置属性集
- component-meta 物料元数据
- selection 画布选中
- detecting 画布 hover
- history 操作历史
![image.png](https://img.alicdn.com/imgextra/i3/O1CN01ZA2RMv1nYlWf6ThGf_!!6000000005102-2-tps-1278-1390.png)
### API 设计约定
一些 API 设计约定:

View File

@ -1,7 +1,8 @@
---
title: DataSource - 数据源 API
sidebar_position: 12
title: demo 使用相关 API
sidebar_position: 2
---
## 数据源相关
### 请求数据源
```javascript
// 请求 userListuserList 在数据源面板中定义)

View File

@ -1,4 +1,6 @@
{
"label": "扩展低代码编辑器",
"position": 1
"label": "扩展编辑态",
"position": 1,
"collapsed": false,
"collapsible": true
}

View File

@ -1,5 +1,5 @@
---
title: 低代码扩展简述
title: 编辑态扩展简述
sidebar_position: 0
---
## 扩展点简述

View File

@ -1,4 +1,6 @@
{
"label": "扩展低代码运行时",
"position": 2
"label": "扩展运行时",
"position": 2,
"collapsed": false,
"collapsible": true
}

View File

@ -9,6 +9,7 @@ sidebar_position: 3
<!-- engine-ext 引擎的扩展包,负责收拢内置 setters / plugins方便迭代 -->
<script crossorigin="anonymous" src="//alifd.alicdn.com/npm/@alilc/lowcode-engine-ext@1.0.1/dist/js/engine-ext.js"></script>
```
> 注,这里的版本号是示例,请尽量选用最新版
工程化配置我们进行了统一,具体如下:
```shell
@ -22,7 +23,6 @@ sidebar_position: 3
"react": "var window.React",
"react-dom": "var window.ReactDOM",
"prop-types": "var window.PropTypes",
"rax": "var window.Rax",
"@alilc/lowcode-engine": "var window.AliLowCodeEngine",
"@alilc/lowcode-engine-ext": "var window.AliLowCodeEngineExt",
"moment": "var moment",
@ -39,7 +39,7 @@ sidebar_position: 3
["build-plugin-fusion", {
}],
["build-plugin-moment-locales", {
"locales": ["zh-cn"]
"locales": ["zh-CN"]
}],
"./build.plugin.js"
]

View File

@ -19,7 +19,8 @@ sidebar_position: 2
几点要求:
1. commit message 格式遵循 [ConvensionalCommits](https://www.conventionalcommits.org/en/v1.0.0/#summary)
![image.png](https://img.alicdn.com/imgextra/i3/O1CN01M9UzVM1iqYpyxECdV_!!6000000004464-2-tps-2070-594.png)
<img src="https://img.alicdn.com/imgextra/i3/O1CN01M9UzVM1iqYpyxECdV_!!6000000004464-2-tps-2070-594.png" width="700"/>
2. 请按照一个 bugfix / feature 对应一个 commit假如不是请 rebase 后再提交 MR不要一堆无用的、试验性的 commit。
好处:从引擎的整体 commit 历史来看,会很清晰,**每个 commit 完成一件确定的事changelog 也能自动生成**。另外,假如因为某个 commit 导致了 bug也很容易通过 rebase drop 等方式快速修复。
@ -42,7 +43,7 @@ sidebar_position: 2
> 此处是理想节奏,实际情况可能会有调整
- 日常迭代 2 周,一般月中或月底
- 日常迭代 2 周,一般月中或月底,发版日两天前发最后一个 beta 版本,原则上不接受新 pr灰度 2 天后,发正式版。
- 特殊情况紧急迭代随时发
- 大 Feature 迭代,每年 2 - 4 次
@ -79,7 +80,34 @@ sidebar_position: 2
如果是发布 beta 版本,步骤如下(以发布 1.0.1 版本为例):
#### 发某版本首个 beta如 1.0.1-beta.0
#### 发某 y 位版本首个 beta如 1.1.0-beta.0
1. 拉 develop 分支
```bash
git checkout develop
```
更新到最新(如需)
```bash
git pull
```
2. 拉 release 分支,此处以 1.1.0 版本做示例
```bash
git checkout -b release/1.1.0-beta
git push --set-upstream origin release/1.1.0-beta
```
3. build
```bash
npm run build
```
4. 发布,此处需有 @alilc scope 发包权限
```bash
npm run pub:preminor
```
5. 同步到 tnpm 源 & alifd CDN
```bash
tnpm run sync
```
#### 发某 z 位版本首个 beta如 1.0.1-beta.0
1. 拉 develop 分支
```bash
git checkout develop

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-engine-docs",
"version": "1.0.7",
"version": "1.0.8",
"description": "低代码引擎版本化文档",
"license": "MIT",
"files": [