feat: 增加开发文档

This commit is contained in:
ningmengchongshui 2024-06-09 23:29:37 +08:00
parent 0602eb0041
commit cab192fae7
4 changed files with 28 additions and 1 deletions

2
.gitignore vendored
View File

@ -148,3 +148,5 @@ yunzai
dist dist
docs

18
deploy.sh Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run docs
# 进入生成的文件夹
cd docs/
git init
git add -A
git commit -m 'add'
git push -f git@github.com:yoimiya-kokomi/Miao-Yunzai.git master:docs

View File

@ -16,6 +16,7 @@
"ts:build": "rollup --config rollup.config.js", "ts:build": "rollup --config rollup.config.js",
"latest:app": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/main.ts", "latest:app": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/main.ts",
"latest:login": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/main.ts login", "latest:login": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/main.ts login",
"docs": "typedoc --options typedoc.json",
"format": "prettier --write .", "format": "prettier --write .",
"prepare": "husky" "prepare": "husky"
}, },
@ -62,10 +63,12 @@
"eslint-plugin-import": "^2.29.1", "eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2", "eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1", "eslint-plugin-promise": "^6.1.1",
"husky": "^9.0.11",
"nodemon": "^3.0.1", "nodemon": "^3.0.1",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"rollup": "^4.16.4", "rollup": "^4.16.4",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typedoc": "^0.25.4",
"typescript": "^5.0.4" "typescript": "^5.0.4"
}, },
"imports": { "imports": {

4
typedoc.json Normal file
View File

@ -0,0 +1,4 @@
{
"entryPoints": ["./src"],
"out": "./docs"
}