Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/upstream' into sync
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	package.json
#	pnpm-lock.yaml
#	src/api/sfc-spec.md
#	src/guide/built-ins/transition.md
#	src/guide/components/slots.md
#	src/guide/reusability/custom-directives.md
#	src/guide/scaling-up/testing.md
#	src/translations/index.md
  • Loading branch information
wxsms committed May 23, 2024
2 parents 5d2d708 + 11a07af commit e089bd2
Show file tree
Hide file tree
Showing 23 changed files with 1,030 additions and 1,770 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.vue
1 change: 1 addition & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ export default defineConfigWithTheme<ThemeConfig>({
markdown: {
theme: 'github-dark',
config(md) {
// @ts-expect-error - broken type output in vitepress
md.use(headerPlugin)
// .use(textAdPlugin)
}
Expand Down
2 changes: 0 additions & 2 deletions .vitepress/headerMdPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export interface AugmentedHeader extends Header {
}

export const headerPlugin = (md: MarkdownIt) => {
md.core.ruler.enable('text_join')

md.renderer.rules.heading_open = (tokens, i, options, env, self) => {
for (const child of tokens[i + 1].children!) {
if (child.type === 'text' && child.content.endsWith('*')) {
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/Home.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { onMounted } from 'vue'
import SiteMap from './SiteMap.vue'
// import NewsLetter from './NewsLetter.vue'
import { load, data, base } from './sponsors'
Expand Down
14 changes: 9 additions & 5 deletions .vitepress/theme/components/VueMasteryBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
></div>
<a
id="vm-banner"
href="https://www.vuemastery.com/free-weekend"
href="https://www.vuemastery.com/pricing/?coupon=FREEWEEKEND2024"
target="_blank"
>
<img
Expand All @@ -23,11 +23,12 @@
<div class="vm-banner-wrapper">
<div class="vm-banner-content">
<h1 class="vm-banner-title">
FREE WEEKEND <span>MAY 10-12</span>
Get
<span> 60% </span>
off a year of Vue Mastery courses
</h1>
<p class="vm-banner-sub">Watch all Vue Mastery courses free</p>
</div>
<button id="vm-banner-cta">Get Access</button>
<button id="vm-banner-cta">Get discount</button>
</div>
<button id="vm-banner-close" @click.prevent="closeBanner">
<VTIconPlus class="close" />
Expand Down Expand Up @@ -154,6 +155,9 @@ onMounted(() => {
font-weight: bold;
font-size: 24px;
text-align: center;
}
.vm-banner-title span{
background: linear-gradient(145deg, #c3ffac, #86ec87, #38a56a);
background-clip: text;
-webkit-background-clip: text;
Expand Down Expand Up @@ -240,7 +244,7 @@ onMounted(() => {
width: 40px;
}
.vm-banner-title {
font-size: 14px;
font-size: 12px;
}
.vm-banner-sub {
font-size: 12px;
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/styles/inline-demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
content: '▶';
width: 20px;
height: 20px;
display: inline-block;
display: inline-flex;
border-radius: 10px;
vertical-align: middle;
position: relative;
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@

## 如何在本地编辑和预览该网站

本项目要求
建议使用 [pnpm](https://pnpm.io/) 作为本地开发的包管理器

- Node.js 为 `v14.0.0` 或更高版本
- pnpm 为 `v7.4.0` 或更高版本

本站基于 [VitePress](https://github.com/vuejs/vitepress)[@vue/theme](https://github.com/vuejs/vue-theme) 建立。网站内容以 Markdown 格式书写,位于 `src` 文件夹中。

```sh
```bash
pnpm i
pnpm run dev
```

该项目要求 Node.js 为 `v18` 或更高版本。并且建议启用 corepack:

```bash
corepack enable
```

## 贡献者列表

最新的文档/翻译贡献情况可以参阅 GitHub 提供的 [contributors](https://github.com/vuejs-translations/docs-zh-cn/graphs/contributors) 页面。
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build.environment]
NODE_VERSION = "16"
NODE_VERSION = "20"

[build]
publish = ".vitepress/dist"
Expand Down
37 changes: 14 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,31 @@
"lint": "zhlint 'src/{api,about,guide,sponsor,translations,tutorial}/**/*.md'",
"clean": "rm -rf .vitepress/dist",
"sync": "node scripts/sync.js",
"preinstall": "npx only-allow pnpm"
"preinstall": "npx only-allow pnpm",
"type": "vue-tsc --noEmit"
},
"dependencies": {
"@vue/repl": "^4.0.1",
"@vue/theme": "^2.2.5",
"@vue/repl": "^4.1.2",
"@vue/theme": "^2.2.11",
"dynamics.js": "^1.1.5",
"gsap": "^3.9.0",
"vitepress": "^1.1.0",
"vue": "^3.4.0"
"gsap": "^3.12.5",
"vitepress": "^1.2.2",
"vue": "^3.4.27"
},
"devDependencies": {
"@types/markdown-it": "^12.2.3",
"@types/node": "^20.10.1",
"@types/body-scroll-lock": "^3.1.2",
"@types/markdown-it": "^14.1.1",
"@types/node": "^20.12.12",
"chalk": "^4.1.2",
"commander": "^9.4.0",
"gray-matter": "^4.0.3",
"lodash": "^4.17.21",
"open": "^8.4.0",
"simple-git": "^2.48.0",
"terser": "^5.14.2",
"terser": "^5.31.0",
"typescript": "^5.4.5",
"vue-tsc": "^2.0.19",
"zhlint": "^0.8.1"
},
"pnpm": {
"overrides": {
"@vitejs/plugin-vue": "5.0.0-beta.1"
},
"peerDependencyRules": {
"ignoreMissing": [
"@algolia/client-search",
"react",
"react-dom",
"@types/react",
"search-insights"
]
}
}
"packageManager": "[email protected]"
}

0 comments on commit e089bd2

Please sign in to comment.