From cab192fae76ac0a6e3641194e564e7a74452fc4f Mon Sep 17 00:00:00 2001 From: ningmengchongshui <916415899@qq.com> Date: Sun, 9 Jun 2024 23:29:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- deploy.sh | 18 ++++++++++++++++++ package.json | 3 +++ typedoc.json | 4 ++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 deploy.sh create mode 100644 typedoc.json diff --git a/.gitignore b/.gitignore index c19fcad..4b5cf7d 100644 --- a/.gitignore +++ b/.gitignore @@ -147,4 +147,6 @@ yunzai /entrypoint.sh -dist \ No newline at end of file +dist + +docs \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..99fd07d --- /dev/null +++ b/deploy.sh @@ -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 diff --git a/package.json b/package.json index 22e3847..c31eb7d 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "ts:build": "rollup --config rollup.config.js", "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", + "docs": "typedoc --options typedoc.json", "format": "prettier --write .", "prepare": "husky" }, @@ -62,10 +63,12 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.1.1", + "husky": "^9.0.11", "nodemon": "^3.0.1", "prettier": "^3.0.3", "rollup": "^4.16.4", "ts-node": "^10.9.1", + "typedoc": "^0.25.4", "typescript": "^5.0.4" }, "imports": { diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..e99483f --- /dev/null +++ b/typedoc.json @@ -0,0 +1,4 @@ +{ + "entryPoints": ["./src"], + "out": "./docs" +}