chore. update generate doc

This commit is contained in:
matrixbirds
2019-07-08 15:16:39 +08:00
parent db778273df
commit 2cff0bc9a9
4 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View File

@@ -70,3 +70,4 @@ android/.gradle
android/proguard-rules.pro
docs
lib
latest

View File

@@ -85,4 +85,6 @@ typedoc.json
typedoc.js
latest
*-beta*
docs
docs
latest/
typedoc.js

View File

@@ -7,8 +7,7 @@
"types": "lib/RtmEngine.d.ts",
"scripts": {
"build": "tsc",
"doc": "typedoc --options typedoc.js && npm run relink",
"relink": "node -e \"fs.existsSync('latest') && fs.unlinkSync('latest'), fs.symlinkSync('0.9.3-beta.1', 'latest')\""
"doc": "typedoc --options typedoc.js"
},
"repository": {
"type": "git",

View File

@@ -1,6 +1,7 @@
const version = require("./package.json").version
const fs = require("fs")
fs.existsSync('latest') && fs.unlinkSync('latest')
!fs.existsSync('latest') && fs.mkdirSync("latest")
fs.writeFileSync('latest/index.html', `<html><head><title>agora react native rtm docs</title></head><body><script>window.location.href="https://agoraio.github.io/RN-SDK-RTM/${version}"</script></body></html>`);
module.exports =
{
"mode": "file",