doc: 添加 TypeScript 文档。
This commit is contained in:
27
.github/workflows/ci.yml
vendored
Normal file
27
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Build and Deploy Documents
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10
|
||||||
|
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run build
|
||||||
|
- run: cp ./example/apple-app-site-association ./typedoc
|
||||||
|
|
||||||
|
- name: Build and Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v2.5.0
|
||||||
|
env:
|
||||||
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
|
PUBLISH_BRANCH: gh-pages
|
||||||
|
PUBLISH_DIR: ./typedoc
|
||||||
15
package.json
15
package.json
@@ -2,7 +2,7 @@
|
|||||||
"name": "@uiw/react-native-wechat",
|
"name": "@uiw/react-native-wechat",
|
||||||
"title": "@uiw/react Native Wechat",
|
"title": "@uiw/react Native Wechat",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "TODO",
|
"description": "React Native 包使用微信分享、登录、收藏、支付等功能。",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"android/libs",
|
"android/libs",
|
||||||
@@ -14,15 +14,16 @@
|
|||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"build": "typedoc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/uiwjs/@uiw/react-native-wechat.git",
|
"url": "git+https://github.com/uiwjs/react-native-wechat.git",
|
||||||
"baseUrl": "https://github.com/uiwjs/@uiw/react-native-wechat"
|
"baseUrl": "https://github.com/uiwjs/react-native-wechat"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native"
|
"react-native",
|
||||||
|
"wechat"
|
||||||
],
|
],
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Kenny Wong",
|
"name": "Kenny Wong",
|
||||||
@@ -37,6 +38,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"react": "^16.9.0",
|
"react": "^16.9.0",
|
||||||
"react-native": "^0.61.5"
|
"react-native": "^0.61.5",
|
||||||
|
"typedoc": "0.17.8",
|
||||||
|
"typescript": "3.9.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
typedoc.json
Normal file
11
typedoc.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"inputFiles": "./index.d.ts",
|
||||||
|
"out": "typedoc",
|
||||||
|
"name": "React Native Wechat",
|
||||||
|
"mode": "file",
|
||||||
|
"includeDeclarations": true,
|
||||||
|
"excludeExternals": true,
|
||||||
|
"ignoreCompilerErrors": true,
|
||||||
|
"excludePrivate": true,
|
||||||
|
"excludeProtected": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user