Skip to content

Commit c8d26d1

Browse files
kieranwvwangqifan
authored andcommitted
feat: add SayHello component and documentation
1 parent 0e0517d commit c8d26d1

30 files changed

+2827
-311
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
dist
2+
cache
23
node_modules
34
*.log
45
.DS_Store
56
.output
67
.eslintcache
78
.idea
8-
docs/.vitepress/cache

.vscode/extensions.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
22
"recommendations": [
33
"vue.volar",
4-
"vue.vscode-typescript-vue-plugin",
54
"dbaeumer.vscode-eslint",
65
"usernamehw.errorlens",
7-
"antfu.unocss",
8-
"antfu.vite",
9-
"lokalise.i18n-ally",
10-
"antfu.iconify"
6+
"antfu.vite"
117
]
128
}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Vue 3 Component Library Starter Template
22

3-
[![Release Version](https://img.shields.io/github/v/release/starter-collective/starter-ui-vue3?style=flat&label=released&color=%2309090b)](https://github.com/starter-collective/starter-ui-vue3/releases)
4-
[![NPM Version](https://img.shields.io/npm/v/starter-ui-vue3?style=flat&label=npm&color=09090b)](https://www.npmjs.com/package/starter-ui-vue3)
3+
[![Release Version](https://img.shields.io/github/v/release/starter-collective/starter-lib-vue3?style=flat&label=released&color=%2309090b)](https://github.com/starter-collective/starter-lib-vue3/releases)
4+
[![NPM Version](https://img.shields.io/npm/v/starter-lib-vue3?style=flat&label=npm&color=09090b)](https://www.npmjs.com/package/starter-lib-vue3)
55

6-
Vue 3 component library starter template, supports Typescript, import on demand, dark mode, I18n and SSR.
6+
Vue 3 component library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.
77

8-
- [Live Demo](https://starter-ui-vue3.netlify.app/)
9-
- [Play on Stackblitz](https://stackblitz.com/github/starter-collective/starter-ui-vue3)
8+
- [Live Demo](https://starter-lib-vue3.netlify.app/)
9+
- [Play on Stackblitz](https://stackblitz.com/github/starter-collective/starter-lib-vue3)
1010
- [README for 中文](./README.zh.md)
1111

1212
## License

README.zh.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Vue 3 组件库启动模板
22

3-
[![发布版本](https://img.shields.io/github/v/release/starter-collective/starter-ui-vue3?style=flat&label=released&color=%2309090b)](https://github.com/starter-collective/starter-ui-vue3/releases)
4-
[![NPM 版本](https://img.shields.io/npm/v/starter-ui-vue3?style=flat&label=npm&color=09090b)](https://www.npmjs.com/package/starter-ui-vue3)
3+
[![发布版本](https://img.shields.io/github/v/release/starter-collective/starter-lib-vue3?style=flat&label=released&color=%2309090b)](https://github.com/starter-collective/starter-lib-vue3/releases)
4+
[![NPM 版本](https://img.shields.io/npm/v/starter-lib-vue3?style=flat&label=npm&color=09090b)](https://www.npmjs.com/package/starter-lib-vue3)
55

6-
Vue 3 组件库启动模板,支持 Typescript、按需导入、暗黑模式、国际化和服务端渲染
6+
Vue 3 组件库启动模板,提供 VitePress 文档,支持构建 ESM、CJS 和 IIFE 格式
77

8-
- [在线演示](https://starter-ui-vue3.netlify.app/)
9-
- [在 Stackblitz 上试用](https://stackblitz.com/github/starter-collective/starter-ui-vue3)
8+
- [在线演示](https://starter-lib-vue3.netlify.app/)
9+
- [在 Stackblitz 上试用](https://stackblitz.com/github/starter-collective/starter-lib-vue3)
1010
- [英文的 README](./README.md)
1111

1212
## 许可证

docs/.vitepress/config/en.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { defineConfig } from 'vitepress'
2+
import pkg from '../../../package.json'
3+
4+
export const en = defineConfig({
5+
lang: 'en-US',
6+
description: 'Vue 3 component library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats.',
7+
themeConfig: {
8+
editLink: {
9+
pattern: 'https://github.com/starter-collective/starter-lib-vue3/edit/main/docs/:path',
10+
text: 'Edit this page on GitHub',
11+
},
12+
nav: [
13+
{ text: 'Guide', link: '/guide/what-is', activeMatch: '/guide/' },
14+
{ text: 'Components', link: '/components', activeMatch: '/components/' },
15+
{
16+
text: `v${pkg.version}`,
17+
items: [
18+
{
19+
text: 'Changelog',
20+
link: 'https://github.com/starter-collective/starter-lib-vue3/releases',
21+
},
22+
],
23+
},
24+
],
25+
sidebar: [
26+
{
27+
text: 'Guide',
28+
collapsed: false,
29+
items: [
30+
{ text: 'What is starter-lib-vue3?', link: '/guide/what-is' },
31+
{ text: 'Get Started', link: '/guide/getting-started' },
32+
],
33+
},
34+
{
35+
text: 'Components',
36+
collapsed: false,
37+
items: [
38+
{ text: 'SayHello', link: '/components/say-hello' },
39+
],
40+
},
41+
],
42+
footer: {
43+
message: 'Released under the MIT License.',
44+
copyright: 'Copyright © 2024-present Kieran Wang',
45+
},
46+
},
47+
})

docs/.vitepress/config/index.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineConfig } from 'vitepress'
2+
import { en } from './en'
3+
import { shared } from './shared'
4+
import { zh } from './zh'
5+
6+
export default defineConfig({
7+
...shared,
8+
// I18n config.
9+
// https://vitepress.dev/zh/guide/i18n
10+
locales: {
11+
root: { label: 'English', ...en },
12+
zh: { label: '中文', ...zh },
13+
},
14+
// Vite config.
15+
// https://vitejs.dev
16+
vite: {
17+
server: {
18+
host: true,
19+
port: 9865,
20+
},
21+
preview: {
22+
host: true,
23+
port: 9865,
24+
},
25+
},
26+
})

docs/.vitepress/config/shared.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export const shared = defineConfig({
4+
title: 'Vue3 Component Library Starter Template',
5+
rewrites: {
6+
'en/:rest*': ':rest*',
7+
},
8+
lastUpdated: true,
9+
cleanUrls: true,
10+
metaChunk: true,
11+
sitemap: {
12+
hostname: 'https://starter-lib-vue3.netlify.app/',
13+
transformItems(items) {
14+
return items.filter(item => !item.url.includes('migration'))
15+
},
16+
},
17+
head: [
18+
['link', { rel: 'icon', href: '/favicon.ico' }],
19+
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
20+
['meta', { name: 'theme-color', content: '#FF057C' }],
21+
['meta', { property: 'og:type', content: 'website' }],
22+
['meta', { property: 'og:locale', content: 'en' }],
23+
['meta', { property: 'og:title', content: 'Vue3 Component Library Starter Template' }],
24+
['meta', { property: 'og:site_name', content: 'Vue3 Component Library Starter Template' }],
25+
['meta', { property: 'og:image', content: '/logo.png' }],
26+
['meta', { property: 'og:url', content: 'https://starter-lib-vue3.netlify.app/' }],
27+
],
28+
themeConfig: {
29+
logo: '/logo.png',
30+
socialLinks: [
31+
{ icon: 'github', link: 'https://github.com/starter-collective/starter-lib-vue3' },
32+
],
33+
search: {
34+
provider: 'local',
35+
},
36+
},
37+
markdown: {
38+
theme: {
39+
light: 'github-light',
40+
dark: 'github-dark',
41+
},
42+
},
43+
})

docs/.vitepress/config/zh.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { defineConfig } from 'vitepress'
2+
import pkg from '../../../package.json'
3+
4+
export const zh = defineConfig({
5+
lang: 'zh-CN',
6+
description: 'Vue 3 组件库启动模板,提供 VitePress 文档,支持构建 ESM、CJS 和 IIFE 格式。',
7+
themeConfig: {
8+
editLink: {
9+
pattern: 'https://github.com/starter-collective/starter-lib-vue3/edit/main/docs/:path',
10+
text: '在 GitHub 上编辑此页面',
11+
},
12+
nav: [
13+
{ text: '指南', link: '/zh/guide/what-is', activeMatch: '/zh/guide/' },
14+
{ text: '函数', link: '/zh/components', activeMatch: '/zh/components/' },
15+
{
16+
text: `v${pkg.version}`,
17+
items: [
18+
{
19+
text: 'Changelog',
20+
link: 'https://github.com/starter-collective/starter-lib-vue3/releases',
21+
},
22+
],
23+
},
24+
],
25+
sidebar: [
26+
{
27+
text: '指南',
28+
collapsed: false,
29+
items: [
30+
{ text: '什么是 starter-lib-vue3?', link: '/zh/guide/what-is' },
31+
{ text: '快速开始', link: '/zh/guide/getting-started' },
32+
],
33+
},
34+
{
35+
text: '组件',
36+
collapsed: false,
37+
items: [
38+
{ text: 'SayHello', link: '/zh/components/say-hello' },
39+
],
40+
},
41+
],
42+
footer: {
43+
message: '基于 MIT 许可证发布。',
44+
copyright: '版权 © 2024-present Kieran Wang',
45+
},
46+
},
47+
})

docs/.vitepress/theme/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import theme from 'vitepress/theme'
2+
import './style.css'
3+
4+
export default {
5+
...theme,
6+
}

docs/.vitepress/theme/style.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
:root {
2+
--vp-c-brand-1: #0D1828;
3+
--vp-c-brand-2: #253953;
4+
--vp-c-brand-3: #46607E;
5+
--vp-c-brand-soft: #E8F5FF50;
6+
--vp-home-hero-name-color: transparent;
7+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #FF057C -80%, #7C64D5);
8+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #7C64D580 30%, #4CC3FF80);
9+
--vp-home-hero-image-filter: blur(30px);
10+
}
11+
12+
.dark {
13+
--vp-c-brand-1: #A8C0D4;
14+
--vp-c-brand-2: #728EA9;
15+
--vp-c-brand-3: #46607E;
16+
--vp-c-brand-soft: #25395350;
17+
--vp-home-hero-name-color: transparent;
18+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #FF057C -80%, #7C64D5);
19+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #7C64D580 30%, #4CC3FF80);
20+
--vp-home-hero-image-filter: blur(30px);
21+
}
22+
23+
html {
24+
font-size: 16px;
25+
}
26+
27+
.VPNavBarTitle span {
28+
white-space: nowrap;
29+
overflow: hidden;
30+
text-overflow: ellipsis;
31+
}

0 commit comments

Comments
 (0)