Skip to content

Commit 4bc64a4

Browse files
authored
Merge pull request #7 from setaman/6-migrate-to-vitepress
6 migrate to vitepress
2 parents 544583f + e1d961b commit 4bc64a4

File tree

259 files changed

+16281
-23380
lines changed

Some content is hidden

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

259 files changed

+16281
-23380
lines changed

.eslintrc.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44
pull_request:
55
branches:
66
- "*"
7-
workflow_dispatch:
7+
8+
concurrency:
9+
group: pages
10+
cancel-in-progress: false
811

912
jobs:
1013
build:
@@ -19,9 +22,16 @@ jobs:
1922
uses: actions/setup-node@v4
2023
with:
2124
node-version: 22
25+
cache: npm
2226

2327
- name: Install dependencies
2428
run: npm ci
2529

30+
- name: Run TS check
31+
run: npm run type-check
32+
33+
- name: Run lint
34+
run: npm run lint
35+
2636
- name: Build VuePress site
27-
run: yarn docs:build
37+
run: npm run docs:build

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818

1919
- name: Setup Node.js
20-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: 22
23+
cache: npm
2324

2425
- name: Install dependencies
2526
run: npm ci
2627

2728
- name: Build VuePress site
28-
run: yarn docs:build
29+
run: npm docs:build
2930

3031
# please check out the docs of the workflow for more details
3132
# @see https://github.com/crazy-max/ghaction-github-pages

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@ dist
104104
.tern-port
105105

106106
.idea
107+
108+
.vitepress/dist
109+
.vitepress/cache

.prettierignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vitepress/config.mts

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
import { defineConfig } from "vitepress";
2+
3+
const isDevMode = process.env.NODE_ENV !== "production";
4+
const basePath = isDevMode
5+
? "/"
6+
: process.env.BASE_PATH || "/vue-ellipse-progress-docs/";
7+
8+
// https://vitepress.dev/reference/site-config
9+
export default defineConfig({
10+
title: "vue-ellipse-progress",
11+
base: basePath,
12+
head: [["link", { rel: "icon", href: `${basePath}favicon.ico` }]],
13+
description:
14+
"vue-ellipse-progress - Beautiful and smooth circular progress bars for your Vue app",
15+
lastUpdated: true,
16+
themeConfig: {
17+
// https://vitepress.dev/reference/default-theme-config
18+
nav: [
19+
{ text: "Guide", link: "/guide" },
20+
{
21+
text: "v2",
22+
items: [
23+
{
24+
text: "Migrate from v1",
25+
link: "/migration/v1",
26+
},
27+
{
28+
text: "Changelog",
29+
link: "https://github.com/setaman/vue-ellipse-progress/blob/master/CHANGELOG.md",
30+
},
31+
{
32+
text: "Roadmap",
33+
link: "https://github.com/users/setaman/projects/1",
34+
},
35+
],
36+
},
37+
],
38+
editLink: {
39+
pattern:
40+
"https://github.com/setaman/vue-ellipse-progress-docs/tree/main/docs/:path",
41+
},
42+
43+
sidebar: {
44+
"/guide/": {
45+
base: "",
46+
items: [
47+
{
48+
text: "Introduction",
49+
link: "/guide/index",
50+
items: [
51+
{
52+
text: "Quick start",
53+
link: "/guide/index",
54+
},
55+
{
56+
text: "Installation",
57+
link: "/guide/installation",
58+
},
59+
{
60+
text: "Usage",
61+
link: "/guide/usage",
62+
},
63+
],
64+
},
65+
{
66+
text: "Props",
67+
collapsed: true,
68+
link: "/guide/options/index",
69+
items: [
70+
{
71+
text: "Props overview",
72+
link: "/guide/options/index",
73+
},
74+
{
75+
text: "progress",
76+
link: "/guide/options/progress",
77+
},
78+
{
79+
text: "legend",
80+
link: "/guide/options/legend",
81+
},
82+
{
83+
text: "legendFormatter",
84+
link: "/guide/options/legendFormatter",
85+
},
86+
{
87+
text: "size",
88+
link: "/guide/options/size",
89+
},
90+
{
91+
text: "line",
92+
link: "/guide/options/line",
93+
},
94+
{
95+
text: "thickness",
96+
link: "/guide/options/thickness",
97+
},
98+
{
99+
text: "emptyThickness",
100+
link: "/guide/options/emptyThickness",
101+
},
102+
{
103+
text: "lineMode",
104+
link: "/guide/options/lineMode",
105+
},
106+
{
107+
text: "linePosition",
108+
link: "/guide/options/linePosition",
109+
},
110+
{
111+
text: "emptyLinePosition",
112+
link: "/guide/options/emptyLinePosition",
113+
},
114+
{
115+
text: "color",
116+
link: "/guide/options/color",
117+
},
118+
{
119+
text: "colorFill",
120+
link: "/guide/options/colorFill",
121+
},
122+
{
123+
text: "emptyColor",
124+
link: "/guide/options/emptyColor",
125+
},
126+
{
127+
text: "emptyColorFill",
128+
link: "/guide/options/emptyColorFill",
129+
},
130+
{
131+
text: "dash",
132+
link: "/guide/options/dash",
133+
},
134+
{
135+
text: "dot",
136+
link: "/guide/options/dot",
137+
},
138+
{
139+
text: "animation",
140+
link: "/guide/options/animation",
141+
},
142+
{
143+
text: "hideLegend",
144+
link: "/guide/options/hideLegend",
145+
},
146+
{
147+
text: "loading",
148+
link: "/guide/options/loading",
149+
},
150+
{
151+
text: "loader",
152+
link: "/guide/options/loader",
153+
},
154+
{
155+
text: "determinate",
156+
link: "/guide/options/determinate",
157+
},
158+
{
159+
text: "half",
160+
link: "/guide/options/half",
161+
},
162+
{
163+
text: "angle",
164+
link: "/guide/options/angle",
165+
},
166+
{
167+
text: "reverse",
168+
link: "/guide/options/reverse",
169+
},
170+
{
171+
text: "noData",
172+
link: "/guide/options/noData",
173+
},
174+
{
175+
text: "fontColor",
176+
link: "/guide/options/fontColor",
177+
},
178+
{
179+
text: "fontSize",
180+
link: "/guide/options/fontSize",
181+
},
182+
{
183+
text: "legendClass",
184+
link: "/guide/options/legendClass",
185+
},
186+
{
187+
text: "gap",
188+
link: "/guide/options/gap",
189+
},
190+
{
191+
text: "data",
192+
link: "/guide/options/data",
193+
},
194+
],
195+
},
196+
{
197+
text: "Slots",
198+
collapsed: true,
199+
link: "/guide/slots/default",
200+
items: [
201+
{
202+
text: "default",
203+
link: "/guide/slots/default",
204+
},
205+
{
206+
text: "legend-caption",
207+
link: "/guide/slots/legend-caption",
208+
},
209+
{
210+
text: "circle-progress",
211+
link: "/guide/slots/circle-progress",
212+
},
213+
{
214+
text: "legend",
215+
link: "/guide/slots/legend",
216+
},
217+
],
218+
},
219+
{
220+
text: "Compatibility",
221+
link: "/guide/compatibility.md",
222+
},
223+
{
224+
text: "Contribution",
225+
link: "/guide/contribution.md",
226+
},
227+
{
228+
text: "Development",
229+
link: "/guide/development.md",
230+
},
231+
],
232+
},
233+
},
234+
235+
socialLinks: [
236+
{
237+
icon: "github",
238+
link: "https://github.com/setaman/vue-ellipse-progress",
239+
},
240+
],
241+
footer: {
242+
message: "Released under the MIT License.",
243+
},
244+
search: {
245+
provider: "local",
246+
},
247+
},
248+
});
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<script setup lang="ts">
2+
import ExampleCode from "../../components/ExampleCode/ExampleCode.vue";
3+
import Vep from "../../components/Vep.vue";
4+
import { ref } from "vue";
5+
import VueformSlider from "@vueform/slider";
6+
7+
const size = 150;
8+
const angle = ref(-90);
9+
</script>
10+
11+
<template>
12+
<example-code>
13+
<template #default="{ progress, loading, noData, determinate }">
14+
<vueform-slider
15+
v-model.number="angle"
16+
class="example-code-slider my-4 w-full"
17+
:min="-720"
18+
:max="720"
19+
/>
20+
21+
<vep
22+
:progress="progress"
23+
:loading="loading"
24+
:no-data="noData"
25+
:determinate="determinate"
26+
:size
27+
:angle
28+
>
29+
</vep>
30+
</template>
31+
<template #code="{ progress }">
32+
<slot name="code" :angle :progress> </slot>
33+
</template>
34+
</example-code>
35+
</template>

0 commit comments

Comments
 (0)