Skip to content

Commit 5c08435

Browse files
committed
doc: 添加 TypeScript 文档。
1 parent 973a80c commit 5c08435

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and Deploy Documents
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build-deploy:
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- uses: actions/checkout@master
12+
13+
- name: Setup Node
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 10
17+
18+
- run: npm install
19+
- run: npm run build
20+
- run: cp ./example/apple-app-site-association ./typedoc
21+
22+
- name: Build and Deploy
23+
uses: peaceiris/[email protected]
24+
env:
25+
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
26+
PUBLISH_BRANCH: gh-pages
27+
PUBLISH_DIR: ./typedoc

package.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@uiw/react-native-wechat",
33
"title": "@uiw/react Native Wechat",
44
"version": "1.0.0",
5-
"description": "TODO",
5+
"description": "React Native 包使用微信分享、登录、收藏、支付等功能。",
66
"main": "index.js",
77
"files": [
88
"android/libs",
@@ -14,15 +14,16 @@
1414
"README.md"
1515
],
1616
"scripts": {
17-
"test": "echo \"Error: no test specified\" && exit 1"
17+
"build": "typedoc"
1818
},
1919
"repository": {
2020
"type": "git",
21-
"url": "git+https://github.com/uiwjs/@uiw/react-native-wechat.git",
22-
"baseUrl": "https://github.com/uiwjs/@uiw/react-native-wechat"
21+
"url": "git+https://github.com/uiwjs/react-native-wechat.git",
22+
"baseUrl": "https://github.com/uiwjs/react-native-wechat"
2323
},
2424
"keywords": [
25-
"react-native"
25+
"react-native",
26+
"wechat"
2627
],
2728
"author": {
2829
"name": "Kenny Wong",
@@ -37,6 +38,8 @@
3738
},
3839
"devDependencies": {
3940
"react": "^16.9.0",
40-
"react-native": "^0.61.5"
41+
"react-native": "^0.61.5",
42+
"typedoc": "0.17.8",
43+
"typescript": "3.9.7"
4144
}
4245
}

typedoc.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"inputFiles": "./index.d.ts",
3+
"out": "typedoc",
4+
"name": "React Native Wechat",
5+
"mode": "file",
6+
"includeDeclarations": true,
7+
"excludeExternals": true,
8+
"ignoreCompilerErrors": true,
9+
"excludePrivate": true,
10+
"excludeProtected": true
11+
}

0 commit comments

Comments
 (0)