Skip to content

Commit 101872d

Browse files
committed
init project
0 parents  commit 101872d

201 files changed

Lines changed: 34252 additions & 0 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[*]
2+
charset = utf-8
3+
indent_style = space
4+
indent_size = 2
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.md]
10+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/compiled/** linguist-vendored
2+
.husky/* linguist-vendored

.github/DEPLOYMENT.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Netlify 部署说明
2+
3+
本项目已配置为可以直接部署到 Netlify。
4+
5+
## 自动部署
6+
7+
1. 将代码推送到 GitHub/GitLab/Bitbucket 仓库
8+
2. 在 Netlify 控制台中连接你的仓库
9+
3. Netlify 会自动检测到 `netlify.toml` 配置文件并使用其中的设置
10+
11+
## 配置说明
12+
13+
项目包含以下配置:
14+
15+
### `netlify.toml`
16+
- **构建命令**: `pnpm install && pnpm run build`
17+
- **发布目录**: `.vitepress/dist`
18+
- **Node.js 版本**: 22
19+
- **pnpm 版本**: 10.13.1
20+
21+
### 安全头部
22+
配置了以下安全头部:
23+
- X-Frame-Options: DENY
24+
- X-Content-Type-Options: nosniff
25+
- Referrer-Policy: no-referrer
26+
- X-XSS-Protection: 1; mode=block
27+
28+
### 缓存策略
29+
- 静态资源 (assets) 缓存 1 年
30+
- 图片文件缓存 7 天
31+
- 包含防盗链和安全重定向
32+
33+
## 手动部署
34+
35+
如果你想手动部署,可以:
36+
37+
1. 本地构建:
38+
```bash
39+
pnpm install
40+
pnpm run build
41+
```
42+
43+
2.`.vitepress/dist` 目录内容上传到 Netlify
44+
45+
## 环境要求
46+
47+
- Node.js >= 22.0.0
48+
- pnpm >= 10.13.0
49+
50+
## 故障排除
51+
52+
如果构建失败,请检查:
53+
1. Node.js 和 pnpm 版本是否符合要求
54+
2. 所有依赖是否正确安装
55+
3. 构建命令是否成功执行

.github/workflows/deploy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 10.13.1
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 22
36+
cache: pnpm
37+
38+
- name: Install dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Build documentation
42+
run: pnpm build
43+
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v5
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: ./.vitepress/dist
51+
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
### OSX ###
2+
# General
3+
.DS_Store
4+
.AppleDouble
5+
.LSOverride
6+
7+
# Thumbnails
8+
._*
9+
10+
# Files that might appear in the root of a volume
11+
.DocumentRevisions-V100
12+
.fseventsd
13+
.Spotlight-V100
14+
.TemporaryItems
15+
.Trashes
16+
.VolumeIcon.icns
17+
.com.apple.timemachine.donotpresent
18+
19+
# Directories potentially created on remote AFP share
20+
.AppleDB
21+
.AppleDesktop
22+
Network Trash Folder
23+
Temporary Items
24+
.apdisk
25+
26+
### Node ###
27+
# Logs
28+
logs
29+
*.log
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log*
33+
lerna-debug.log*
34+
35+
# Diagnostic reports (https://nodejs.org/api/report.html)
36+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
37+
38+
# Runtime data
39+
pids
40+
*.pid
41+
*.seed
42+
*.pid.lock
43+
44+
# Directory for instrumented libs generated by jscoverage/JSCover
45+
lib-cov
46+
47+
# Coverage directory used by tools like istanbul
48+
coverage
49+
*.lcov
50+
51+
# nyc test coverage
52+
.nyc_output
53+
54+
# node-waf configuration
55+
.lock-wscript
56+
57+
# Compiled binary addons (https://nodejs.org/api/addons.html)
58+
scripts/Release
59+
60+
# Dependency directories
61+
node_modules/
62+
jspm_packages/
63+
64+
# TypeScript v1 declaration files
65+
typings/
66+
67+
# TypeScript cache
68+
*.tsbuildinfo
69+
70+
# Optional npm cache directory
71+
.npm
72+
73+
# Optional eslint cache
74+
.eslintcache
75+
76+
# Optional REPL history
77+
.node_repl_history
78+
79+
# Output of 'npm pack'
80+
*.tgz
81+
82+
# Yarn Integrity file
83+
.yarn-integrity
84+
85+
# pnpm link folder
86+
pnpm-global
87+
88+
# dotenv environment variables file
89+
.env
90+
.env.test
91+
92+
# parcel-bundler cache (https://parceljs.org/)
93+
.cache
94+
95+
# rollup.js default build output
96+
dist/
97+
dist.zip
98+
99+
# vuepress build output
100+
.vuepress/dist
101+
102+
# vitepress build output
103+
.vitepress/dist
104+
105+
# Serverless directories
106+
.serverless/
107+
108+
# Temporary folders
109+
tmp/
110+
temp/
111+
TODOs.md
112+
src/api/index.json
113+
src/examples/data.json
114+
src/tutorial/data.json
115+
draft.md
116+
117+
# IDEs
118+
.idea
119+
.history
120+
cache/

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
registry=https://registry.npmmirror.com/
2+
shamefully-hoist=true
3+
ignore-workspace-root-check=true
4+
strict-peer-dependencies=false

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pnpm-lock.yaml
2+
dist/
3+
temp/
4+
LICENSE.md
5+
pnpm-workspace.yaml
6+
# prettier doesn't respect newlines between chained methods
7+
# https://github.com/prettier/prettier/issues/7884
8+
**/*.spec.js
9+
**/*.spec.ts
10+
**/dist
11+
**/lib
12+
scripts/
13+
.history
14+

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@winner-fed/prettier-config-win"

0 commit comments

Comments
 (0)