Skip to content

Commit 0c4455a

Browse files
committed
✨ setup
0 parents  commit 0c4455a

File tree

449 files changed

+37441
-0
lines changed

Some content is hidden

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

449 files changed

+37441
-0
lines changed

.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

.github/contributing/oxford-comma.jpg

217 KB
Loading

.github/contributing/writing-guide.md

Lines changed: 109 additions & 0 deletions
Large diffs are not rendered by default.

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: 'npm'
5+
# Look for `package.json` and `lock` files in the `root` directory
6+
directory: '/'
7+
# Check the npm registry for updates every day (weekdays)
8+
schedule:
9+
interval: 'daily'
10+
open-pull-requests-limit: 10
11+
versioning-strategy: lockfile-only
12+
allow:
13+
- dependency-name: 'vue'
14+
- dependency-name: 'vitepress'
15+
- dependency-name: '@vue/theme'
16+
- dependency-name: '@vue/repl'

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Description of Problem
2+
3+
## Proposed Solution
4+
5+
## Additional Information

.github/scripts/tag-alert-blocks.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env node
2+
3+
const { exec } = require('child_process')
4+
5+
/**
6+
* Execute a command and return stdout as string.
7+
* @param {string} command
8+
* @returns {Promise<string>}
9+
*/
10+
function run(command) {
11+
return new Promise((resolve, reject) => {
12+
exec(command, { encoding: 'utf-8' }, (error, stdout) =>
13+
error ? reject(error) : resolve(stdout)
14+
)
15+
})
16+
}
17+
18+
const ALERT_BLOCK = /^\+\s*:::\s?(\w+)/m
19+
20+
async function isUsingAlertBlock(base = 'origin/cn') {
21+
const result = await run(`git diff --name-only ${base}`)
22+
const files = (
23+
await Promise.all(
24+
result
25+
.trim()
26+
.split(/\r?\n/)
27+
.map(file =>
28+
run(`git diff ${base} -- ${file}`)
29+
.then(diff => ALERT_BLOCK.test(diff))
30+
.then(usesAlertBlock => (usesAlertBlock ? file : ''))
31+
)
32+
)
33+
).filter(Boolean)
34+
35+
if (files.length) {
36+
return true
37+
}
38+
39+
return false
40+
}
41+
42+
module.exports = { isUsingAlertBlock }

.github/workflows/automerge.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1.1.1
16+
with:
17+
github-token: '${{ secrets.GITHUB_TOKEN }}'
18+
- name: Enable auto-merge for theme
19+
if: ${{contains(steps.metadata.outputs.dependency-names, '@vue/theme') && steps.metadata.outputs.update-type != 'version-update:semver-major'}}
20+
run: gh pr merge --auto --merge "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/autosync.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Auto Sync
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # At 00:00. https://crontab.guru/
6+
workflow_dispatch: # on button click
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: TobKed/github-forks-sync-action@master
13+
with:
14+
github_token: ${{ secrets.UPSTREAM_SYNC_TOKEN }}
15+
upstream_repository: vuejs/docs
16+
upstream_branch: main
17+
target_repository: vuejs-translations/docs-zh-cn
18+
target_branch: upstream
19+
force: false
20+
tags: false

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to Gitee
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2.0.1
16+
with:
17+
version: ^6.24.4
18+
19+
- name: Set node version to 16
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 16
23+
cache: 'pnpm'
24+
25+
- run: pnpm install
26+
- run: pnpm run build
27+
28+
- run: |
29+
cd .vitepress/dist
30+
git init
31+
git config user.email "yyx990803@gmail.com"
32+
git config user.name "Evan You"
33+
git add .
34+
git commit -m "update docs"
35+
git remote add origin https://yyx990803:${{ secrets.GITEE_TOKEN }}@gitee.com/vuejs-cn/vue3-docs-cn.git
36+
git push origin HEAD:master --force

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
build/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+
98+
# vuepress build output
99+
.vuepress/dist
100+
101+
# Serverless directories
102+
.serverless/
103+
104+
# Temporary folders
105+
tmp/
106+
temp/
107+
TODOs.md
108+
src/api/index.json
109+
src/examples/data.json
110+
src/tutorial/data.json
111+
draft.md
112+
113+
# IDEs
114+
.idea

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 75
6+
}

0 commit comments

Comments
 (0)