Skip to content

Commit 656ec8f

Browse files
committed
doc: update
1 parent 8a0a4e9 commit 656ec8f

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# im-client
2+
## 运行项目
3+
安装依赖
4+
```shell
5+
npm install
6+
```
7+
运行
8+
```shell
9+
react-native run-ios
10+
// or
11+
react-native run-android
12+
```
213

3-
## 模式切换
4-
通过更改 `app.json``appMode` 字段,进行组件调试模式(Demo)和 Im 模式(ImClient)的切换
14+
## 开发模式切换
15+
通过更改 `app.json``appMode` 字段,进行组件调试模式(`UiLibrary`)和 Im 模式(`ImClient`)的切换。
16+
所有基础组件在 `UiLibrary` 文件夹,与业务无关启动。
17+
Im 功能代码在 `src` 文件夹内。

app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "ImClient",
33
"displayName": "ImClient",
4-
"appMode": "Demo"
4+
"appMode": "UiLibrary"
55
}

index.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ const APP_INFO = require('./app.json');
2020

2121
if (APP_INFO.appMode === 'ImClient') {
2222
AppRegistry.registerComponent('ImClient', () => ImClient);
23-
} else if (APP_INFO.appMode === 'Demo') {
23+
} else if (APP_INFO.appMode === 'UiLibrary') {
2424
AppRegistry.registerComponent('ImClient', () => Demo);
2525
}

index.ios.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
import {
13-
AppRegistry,
13+
AppRegistry,
1414
} from 'react-native';
1515

1616
import ImClient from './src/index.js';
@@ -20,6 +20,6 @@ const APP_INFO = require('./app.json');
2020

2121
if (APP_INFO.appMode === 'ImClient') {
2222
AppRegistry.registerComponent('ImClient', () => ImClient);
23-
} else if (APP_INFO.appMode === 'Demo') {
23+
} else if (APP_INFO.appMode === 'UiLibrary') {
2424
AppRegistry.registerComponent('ImClient', () => Demo);
2525
}

0 commit comments

Comments
 (0)