Skip to content

Commit 506781c

Browse files
committed
Add VitePress
1 parent bfcb5c7 commit 506781c

File tree

4 files changed

+325
-0
lines changed

4 files changed

+325
-0
lines changed

Diff for: docs/.vitepress/config.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { defineConfigWithTheme } from 'vitepress'
2+
import path from 'path'
3+
4+
export default defineConfigWithTheme({
5+
base: '/vue-vnode-utils',
6+
title: '@skirtle/vue-vnode-utils',
7+
lang: 'en-US',
8+
description: 'VNode utilities for Vue',
9+
10+
vite: {
11+
resolve: {
12+
alias: {
13+
'@skirtle/vue-vnode-utils': path.resolve(__dirname, '../../src/vue-vnode-utils.ts')
14+
}
15+
}
16+
},
17+
18+
themeConfig: {
19+
socialLinks: [
20+
{ icon: 'github', link: 'https://github.com/skirtles-code/vue-vnode-utils' }
21+
]
22+
}
23+
})

Diff for: docs/index.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: home
3+
4+
title: vue-vnode-utils
5+
titleTemplate: VNode utilities for Vue
6+
7+
hero:
8+
name: vue-vnode-utils
9+
text: Helper functions for working with Vue VNodes
10+
tagline: Smoothing over the edge cases for working with the VNodes returned by a slot
11+
actions:
12+
- theme: brand
13+
text: Get Started
14+
link: /guide/introduction
15+
- theme: alt
16+
text: View on GitHub
17+
link: https://github.com/skirtles-code/vue-vnode-utils
18+
19+
features:
20+
- title: 🧩 Fragment-aware iteration
21+
details: Walk child VNodes without worrying about fragments created by v-for.
22+
- title: ➕ Add props
23+
details: Add extra props, CSS classes or events to slot contents.
24+
- title: 🌲 Edit the tree
25+
details: Remove existing nodes, wrap them with other nodes, or insert new nodes into the VNode tree.
26+
- title: 🙈 Probably not a good idea
27+
details: But if you really have to manipulate VNodes, a library to smooth over the edge cases makes it less likely to go wrong.
28+
---

Diff for: package.json

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"typescript": "^4.8.4",
3838
"vite": "^3.1.4",
3939
"vite-plugin-dts": "^1.6.4",
40+
"vitepress": "1.0.0-alpha.19",
4041
"vitest": "^0.24.0",
4142
"vue": "^3.2.0",
4243
"vue-tsc": "^0.40.13"
@@ -49,6 +50,9 @@
4950
"build-neutral": "vite build --mode neutral",
5051
"build-prod": "vite build --mode production",
5152
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
53+
"docs:dev": "vitepress dev docs",
54+
"docs:build": "vitepress build docs",
55+
"docs:serve": "vitepress serve docs",
5256
"preinstall": "npx only-allow pnpm"
5357
}
5458
}

0 commit comments

Comments
 (0)