Skip to content

Commit e6a6f10

Browse files
authored
🚗 docs: refactor (#259)
* docs: vitepress v2 * docs: vitepress v2 * docs: v2 * docs: vitepress v2 * docs: refactor useCounter * docs: refactor useAsyncOrder * docs: refactor useDarkMode * docs: refactor useDebounce * docs: refactor useDebounce * docs: refactor useDebounce * docs: refactor useDebounceFn * docs: refactor useDebounceFn * docs: remove path / * docs: refactor useDrop & useDrag * docs: refactor useDrop & useDrag * docs: refactor useElementBounding * docs: refactor useEventEmitter * docs: refactor useEventEmitter * docs: refactor useExternal * docs: refactor useFavicon * docs: refactor useFetchs * docs: refactor useFocusWithin * docs: refactor useFormatResult * docs: refactor useFullscreen * docs: refactor useHover * docs: refactor useImmer * docs: refactor useInfiniteScroll * docs: refactor useInterval * docs: refactor useInViewport * docs: refactor useKeyPress * docs: refactor useLocalStorageState * docs: refactor useLockFn * docs: refactor useLongPress * docs: refactor useMap * docs: refactor useMedia * docs: refactor useMouse * docs: refactor useMutationObserver * docs: refactor useNetwork * docs: refactor usePrevious * docs: add demo * docs: refactor useResizeObserver * docs: refactor useScroll * docs: refactor useSessionStorageState * docs: refactor useSet * docs: refactor useSetState * docs: refactor useSize * docs: refactor useThrottle * docs: refactor useThrottleFn * docs: refactor useTimeout * docs: refactor useTitle * docs: refactor useToggle * docs: refactor useTrackedEffect * docs: refactor useUpdate * docs: refactor useUpdate * docs: refactor useVirtualList * docs: refactor useWebSocket * docs: refactor useWinResize * docs: refactor useWorker * docs: refactor useRequest * docs: add algolia * docs: github page * chore: pnpm * chore: pnpm * chore: pnpm * chore: pnpm * chore: pnpm * chore: pnpm * chore: docs base * chore: docs base * chore: docs base * docs: logo * docs: search * docs: search * docs: search * docs: search * docs: search * docs: search * docs: search * docs: search * docs: search * test: fixed * test: fixed * test: fixed * docs: pwa * docs: pwa * docs: pwa * docs: pwa * docs: pwa * docs: pwa * docs: pwa * docs: pwa * docs: zh home * docs: remove old * docs: remove old * docs: pwa * docs: pwa icon * docs: pwa icon * docs: pwa icon * docs: pwa icon * docs: pwa icon * docs: pwa icon * docs: pwa icon * chore: ci
1 parent 416f6b9 commit e6a6f10

File tree

335 files changed

+10822
-4471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+10822
-4471
lines changed

.github/workflows/algolia.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
algolia:
12+
needs: deploy
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Get the content of algolia.json as config
17+
id: algolia_config
18+
run: echo "::set-output name=config::$(cat algolia.json | jq -r tostring)"
19+
- name: Push indices to Algolia
20+
uses: signcl/docsearch-scraper-action@master
21+
env:
22+
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
23+
API_KEY: ${{ secrets.API_KEY }}
24+
CONFIG: ${{ steps.algolia_config.outputs.config }}

.github/workflows/ci.yml

-9
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,5 @@ jobs:
4343
- name: Build Lib
4444
run: |
4545
pnpm build
46-
- name: Build Docs plugin
47-
run: |
48-
cd packages/vitepress/vitepress-demo-block
49-
pnpm run build
50-
- name: Build Docs
51-
run: |
52-
cd packages/hooks
53-
pnpm run initial
54-
pnpm run docs:build
5546
env:
5647
CI: true

.github/workflows/deploy.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
# 在针对 `main` 分支的推送上运行。如果你
7+
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
8+
push:
9+
branches: [master]
10+
11+
# 允许你从 Actions 选项卡手动运行此工作流程
12+
workflow_dispatch:
13+
14+
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
21+
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# 构建工作
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
35+
# - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消此区域注释
36+
# with:
37+
# version: 9
38+
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
39+
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v4
42+
43+
- name: Get pnpm store directory
44+
id: pnpm-cache
45+
run: |
46+
echo "pnpm_cache_dir=$(pnpm store path)" >> "$GITHUB_OUTPUT"
47+
48+
- name: Setup pnpm cache
49+
uses: actions/cache@v4
50+
with:
51+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
52+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
53+
restore-keys: |
54+
${{ runner.os }}-pnpm-store-
55+
- name: Setup Node
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: 18.x
59+
cache: pnpm # 或 pnpm / yarn
60+
- name: Setup Pages
61+
uses: actions/configure-pages@v4
62+
- name: Install dependencies
63+
run: pnpm install # 或 pnpm install / yarn install / bun install
64+
- name: Build with VitePress
65+
run: pnpm docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
66+
- name: Upload artifact
67+
uses: actions/upload-pages-artifact@v3
68+
with:
69+
path: docs/.vitepress/dist
70+
71+
# 部署工作
72+
deploy:
73+
environment:
74+
name: github-pages
75+
url: ${{ steps.deployment.outputs.page_url }}
76+
needs: build
77+
runs-on: ubuntu-latest
78+
name: Deploy
79+
steps:
80+
- name: Deploy to GitHub Pages
81+
id: deployment
82+
uses: actions/deploy-pages@v4

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ dist
33
.DS_Store
44
.cache
55
.temp
6+
cache
67
coverage
8+
.docs
79

810

911
# lock

.husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx --no-install commitlint --edit "$1"
4+
# npx --no-install commitlint --edit "$1"

.markdownlint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"no-inline-html": {
3-
"allowed_elements": ["ul", "li", "div", "img", "a", "br", "script", "Badge", "Home"]
3+
"allowed_elements": ["ul", "li", "div", "img", "a", "br", "script", "Badge", "Home","demo"]
44
},
55
"MD013": false,
66
"MD041": false

.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shamefully-hoist=true
2+
auto-install-peers=true
3+
strict-peer-dependencies=false

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

algolia.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"index_name": "vue-hooks-plus-search",
3+
"start_urls": ["https://inhiblabcore.github.io/vue-hooks-plus"],
4+
"rateLimit": 8,
5+
"maxDepth": 10,
6+
"selectors": {
7+
"lvl0": {
8+
"selector": "",
9+
"defaultValue": "Documentation"
10+
},
11+
"lvl1": ".content h1",
12+
"lvl2": ".content h2",
13+
"lvl3": ".content h3",
14+
"lvl4": ".content h4",
15+
"lvl5": ".content h5",
16+
"content": ".content p, .content li",
17+
"lang": {
18+
"selector": "/html/@lang",
19+
"type": "xpath",
20+
"global": true,
21+
"default_value": "zh-CN"
22+
}
23+
},
24+
"custom_settings": {
25+
"attributesForFaceting": ["lang"]
26+
}
27+
}

0 commit comments

Comments
 (0)