diff --git a/docs/.vitepress/components/GiscusComment/index.vue b/docs/.vitepress/components/GiscusComment/index.vue
new file mode 100644
index 00000000..e39067dc
--- /dev/null
+++ b/docs/.vitepress/components/GiscusComment/index.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts
index bdebade0..6eb6f8bf 100644
--- a/docs/.vitepress/theme/index.ts
+++ b/docs/.vitepress/theme/index.ts
@@ -1,3 +1,4 @@
+import { h } from 'vue';
import Theme from 'vitepress/theme';
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client';
import '@shikijs/vitepress-twoslash/style.css';
@@ -6,10 +7,17 @@ import './style.css';
import RulePlay from '../components/RulePlay/index.vue';
import RuleComparess from '../components/RuleComparess/index.vue';
import Playground from '../components/Playground/index.vue';
+import GiscusComment from '../components/GiscusComment/index.vue';
export default {
...Theme,
+ Layout() {
+ return h(Theme.Layout, null, {
+ 'doc-after': () => h(GiscusComment)
+ });
+ },
+
enhanceApp({ app }) {
app.use(TwoslashFloatingVue);
app.component('RulePlay', RulePlay);
diff --git a/docs/cli/index.md b/docs/cli/index.md
index 3dae5a66..0c56e42b 100644
--- a/docs/cli/index.md
+++ b/docs/cli/index.md
@@ -2,7 +2,7 @@
outline: deep
---
-# CLI
+# 命令行工具
> 命令行工具
diff --git a/docs/help/index.md b/docs/help/index.md
index fb03fc8b..e0dc7bf8 100644
--- a/docs/help/index.md
+++ b/docs/help/index.md
@@ -2,7 +2,7 @@
outline: deep
---
-# any-reader
+# 常见问题
## 参与开发
diff --git a/docs/package.json b/docs/package.json
index fbf831bc..0fac7311 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -13,6 +13,7 @@
"@any-reader/rule-utils": "workspace:^",
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/theme-one-dark": "^6.1.2",
+ "@giscus/vue": "^3.0.0",
"@shikijs/vitepress-twoslash": "^1.18.0",
"codemirror": "^6.0.1",
"js-base64": "^3.7.7",
diff --git a/docs/play/core.md b/docs/play/core.md
index 617d7cea..47452c00 100644
--- a/docs/play/core.md
+++ b/docs/play/core.md
@@ -1,3 +1,5 @@
+# 规则测试
+
> 开发中!
>
> 目前在线工具规则部分不支持 `@filter`, 仅支持部分 `@js`
diff --git a/package.json b/package.json
index 3e545d2d..92f443e9 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,6 @@
"epub:build": "pnpm --filter=@any-reader/epub build",
"build:web": "pnpm --filter=@any-reader/web build",
"build:web-w": "pnpm --filter=@any-reader/web build:w",
- "run:vsc": "npm-run-all core:build build:web-w",
"docs": "pnpm --filter docs docs:dev",
"build:docs": "pnpm --filter docs docs:build",
"run:server": "run-p server run:web",
@@ -48,8 +47,9 @@
"web:dev": "npm-run-all --parallel web:server server",
"electron:server": "pnpm --filter=@any-reader/web electron:dev",
"electron:build": "pnpm --filter=@any-reader/web electron:build",
- "vscode:server": "pnpm --filter=@any-reader/web vscode:dev",
- "vscode:dev": "npm-run-all core:build shared:build --parallel vscode:server server",
+ "vscode:compile": "pnpm --filter=@any-reader/vscode dev",
+ "vscode:dev": "npm-run-all build:web-w vscode:compile",
+ "vscode:web": "npm-run-all --parallel vscode:server server",
"vscode:build-tpl": "pnpm --filter=@any-reader/web vscode:build",
"vscode:build-vsx": "pnpm --filter=@any-reader/vscode build",
"vscode:build": "npm-run-all vscode:build-tpl vscode:build-vsx",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d3007f34..0eaf5919 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -126,6 +126,9 @@ importers:
'@codemirror/theme-one-dark':
specifier: ^6.1.2
version: 6.1.2
+ '@giscus/vue':
+ specifier: ^3.0.0
+ version: 3.0.0(vue@3.5.3(typescript@5.5.4))
'@shikijs/vitepress-twoslash':
specifier: ^1.18.0
version: 1.18.0(typescript@5.5.4)
@@ -1552,6 +1555,11 @@ packages:
'@gar/promisify@1.1.3':
resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==}
+ '@giscus/vue@3.0.0':
+ resolution: {integrity: sha512-ZoSUmlc3ee2a+kdumCaXFDZaB4h9b1BYWzsmmRP7zoGEQKYopdAnzGvJK7RdvrYGAzNqZtGUxI0NnBl8/UA6bQ==}
+ peerDependencies:
+ vue: '>=3.2.0'
+
'@hapi/bourne@3.0.0':
resolution: {integrity: sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==}
@@ -1666,6 +1674,12 @@ packages:
'@lezer/lr@1.4.2':
resolution: {integrity: sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==}
+ '@lit-labs/ssr-dom-shim@1.2.1':
+ resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==}
+
+ '@lit/reactive-element@2.0.4':
+ resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==}
+
'@malept/cross-spawn-promise@1.1.1':
resolution: {integrity: sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==}
engines: {node: '>= 10'}
@@ -1859,46 +1873,55 @@ packages:
resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.21.2':
resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==}
cpu: [arm]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.21.2':
resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.21.2':
resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-powerpc64le-gnu@4.21.2':
resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-riscv64-gnu@4.21.2':
resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-s390x-gnu@4.21.2':
resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.21.2':
resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-musl@4.21.2':
resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-win32-arm64-msvc@4.21.2':
resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==}
@@ -2185,6 +2208,9 @@ packages:
'@types/tough-cookie@4.0.5':
resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
+ '@types/trusted-types@2.0.7':
+ resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
+
'@types/unist@3.0.3':
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
@@ -4473,6 +4499,9 @@ packages:
resolution: {integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==}
hasBin: true
+ giscus@1.5.0:
+ resolution: {integrity: sha512-t3LL0qbSO3JXq3uyQeKpF5CegstGfKX/0gI6eDe1cmnI7D56R7j52yLdzw4pdKrg3VnufwCgCM3FDz7G1Qr6lg==}
+
github-from-package@0.0.0:
resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
@@ -5072,6 +5101,15 @@ packages:
lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ lit-element@4.1.1:
+ resolution: {integrity: sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==}
+
+ lit-html@3.2.1:
+ resolution: {integrity: sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==}
+
+ lit@3.2.1:
+ resolution: {integrity: sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==}
+
load-tsconfig@0.2.5:
resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -8576,6 +8614,11 @@ snapshots:
'@gar/promisify@1.1.3': {}
+ '@giscus/vue@3.0.0(vue@3.5.3(typescript@5.5.4))':
+ dependencies:
+ giscus: 1.5.0
+ vue: 3.5.3(typescript@5.5.4)
+
'@hapi/bourne@3.0.0': {}
'@humanwhocodes/config-array@0.13.0':
@@ -8730,6 +8773,12 @@ snapshots:
dependencies:
'@lezer/common': 1.2.1
+ '@lit-labs/ssr-dom-shim@1.2.1': {}
+
+ '@lit/reactive-element@2.0.4':
+ dependencies:
+ '@lit-labs/ssr-dom-shim': 1.2.1
+
'@malept/cross-spawn-promise@1.1.1':
dependencies:
cross-spawn: 7.0.3
@@ -9356,6 +9405,8 @@ snapshots:
'@types/tough-cookie@4.0.5': {}
+ '@types/trusted-types@2.0.7': {}
+
'@types/unist@3.0.3': {}
'@types/uuid@10.0.0': {}
@@ -12433,6 +12484,10 @@ snapshots:
pathe: 1.1.2
tar: 6.2.1
+ giscus@1.5.0:
+ dependencies:
+ lit: 3.2.1
+
github-from-package@0.0.0: {}
glob-parent@5.1.2:
@@ -13073,6 +13128,22 @@ snapshots:
lines-and-columns@1.2.4: {}
+ lit-element@4.1.1:
+ dependencies:
+ '@lit-labs/ssr-dom-shim': 1.2.1
+ '@lit/reactive-element': 2.0.4
+ lit-html: 3.2.1
+
+ lit-html@3.2.1:
+ dependencies:
+ '@types/trusted-types': 2.0.7
+
+ lit@3.2.1:
+ dependencies:
+ '@lit/reactive-element': 2.0.4
+ lit-element: 4.1.1
+ lit-html: 3.2.1
+
load-tsconfig@0.2.5: {}
loader-runner@4.3.0: {}