Skip to content

Commit 38f4861

Browse files
Chore: package update and migration to updates
Signed-off-by: Kiran Parajuli <[email protected]>
1 parent 19d0a6b commit 38f4861

File tree

8 files changed

+45
-25
lines changed

8 files changed

+45
-25
lines changed

src/constants/Links.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const Links = {
2+
Github: "https://github.com/vue-formik/vue-formik",
3+
NPM: "https://www.npmjs.com/package/vue-formik",
4+
Documentation: "https://vue-formik.netlify.app/",
5+
Playground: "https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2FApp.vue",
6+
Issues: "https://github.com/vue-formik/vue-formik/issues",
7+
PullRequests: "https://github.com/vue-formik/vue-formik/pulls",
8+
9+
Yup: "https://github.com/jquense/yup",
10+
Joi: "https://joi.dev/",
11+
Zod: "https://zod.dev/",
12+
Formik: "https://formik.org",
13+
14+
DemoViewGHPage: "https://github.com/vue-formik/docs/blob/main/src/views/DemoView.vue",
15+
KiranLinkedIn: "https://www.linkedin.com/in/kiranparajuli589/",
16+
};
17+
18+
export default Links;

src/constants/theSidebarItems.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Links from "@/constants/Links.ts";
2+
13
export default [
24
{
35
name: "Getting Started",
@@ -31,7 +33,7 @@ export default [
3133
{ name: "Demo", path: "/demo" },
3234
{
3335
name: "Playground",
34-
path: "https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2Fcomponents%2FHelloWorld.vue",
36+
path: Links.Playground,
3537
},
3638
],
3739
},

src/views/AboutView.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,44 +45,45 @@
4545

4646
<script setup lang="ts">
4747
import pkgJson from "../../package.json";
48+
import Links from "@/constants/Links.ts";
4849
const { dependencies } = pkgJson;
4950
const version = dependencies["vue-formik"]?.replace(/^\^/, "");
5051
const links = [
5152
{
5253
title: "Github",
53-
url: "https://github.com/vue-formik/vue-formik",
54+
url: Links.Github,
5455
color: "text-gray-100",
5556
},
5657
{
5758
title: "Documentation",
58-
url: "https://vue-formik.netlify.app",
59+
url: Links.Documentation,
5960
color: "text-green-500",
6061
},
6162
{
6263
title: "Playground",
63-
url: "https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2FApp.vue",
64+
url: Links.Playground,
6465
color: "text-blue-500",
6566
},
6667
{
6768
title: "NPM",
68-
url: "https://www.npmjs.com/package/vue-formik",
69+
url: Links.NPM,
6970
color: "text-red-500",
7071
},
7172
{
7273
title: "Issues",
73-
url: "https://github.com/vue-formik/vue-formik/issues",
74+
url: Links.Issues,
7475
color: "text-yellow-500",
7576
},
7677
{
7778
title: "Pull Requests",
78-
url: "https://github.com/vue-formik/vue-formik/pulls",
79+
url: Links.PullRequests,
7980
color: "text-purple-500",
8081
},
8182
];
8283
const author = {
8384
name: "Kiran Parajuli",
8485
85-
linkedIn: "https://www.linkedin.com/in/kiranparajuli589/",
86+
linkedIn: Links.KiranLinkedIn,
8687
};
8788
const birth = "2024-12-28T18:22:01.000Z";
8889
const fromNow = new Date(birth).toLocaleString();

src/views/DemoView.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<p class="py-2 text-sm">
3737
<span> You can find the source code for this example on </span>
3838
<a
39-
href="https://github.com/vue-formik/docs/blob/main/src/views/DemoView.vue"
39+
:href="Links.DemoViewGHPage"
4040
target="_blank"
4141
rel="noopener noreferrer"
4242
class="text-blue-500 underline"
@@ -53,6 +53,7 @@ import { onBeforeMount, ref } from "vue";
5353
import ValidationSchemaPreview from "@/components/home/ValidationSchemaPreview.vue";
5454
import ExpoForm from "@/components/home/ExpoForm.vue";
5555
import { DemoTabs } from "@/constants/demo.ts";
56+
import Links from "@/constants/Links.ts";
5657
5758
onBeforeMount(() => {
5859
document.title = "Home | Vue Formik";

src/views/HomeView.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@
1313
<router-link class="secondary-btn md" to="/getting-started/quick-start">
1414
Get Started
1515
</router-link>
16-
<a
17-
class="secondary-btn md"
18-
target="_blank"
19-
href="https://stackblitz.com/edit/vitejs-vite-px7jzkdy?file=src%2FApp.vue"
20-
>
21-
Playground
22-
</a>
16+
<a class="secondary-btn md" target="_blank" :href="Links.Playground"> Playground </a>
2317
</div>
2418
</section>
2519

@@ -46,7 +40,9 @@
4640
</section>
4741
</template>
4842

49-
<script setup lang="ts"></script>
43+
<script setup lang="ts">
44+
import Links from "@/constants/Links.js";
45+
</script>
5046

5147
<style lang="scss">
5248
.text-gradient {

src/views/gettingStarted/IntroductionView.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<p>
1919
Vue Formik is a powerful library for Vue.js that simplifies form handling by providing a
2020
more structured approach to managing HTML forms. Inspired by the popular React library
21-
<a href="https://formik.org" target="_blank" title="Formik">Formik</a>, Vue Formik leverages
21+
<a :href="Links.Formik" target="_blank" title="Formik">Formik</a>, Vue Formik leverages
2222
Vue's built-in reactivity system to streamline form development and management. 💡
2323
</p>
2424
</section>
@@ -48,10 +48,9 @@
4848
</li>
4949
<li>
5050
You can create custom validation functions or integrate a library like
51-
<a href="https://github.com/jquense/yup" target="_blank" title="Yup" class="text-primary"
52-
>Yup</a
53-
>, <a href="https://joi.dev/" target="_blank" title="Joi" class="text-primary">Joi</a>, or
54-
<a href="https://zod.dev/" target="_blank" title="Zod" class="text-primary">Zod</a>
51+
<a :href="Links.Yup" target="_blank" title="Yup" class="text-primary">Yup</a>,
52+
<a :href="Links.Joi" target="_blank" title="Joi" class="text-primary">Joi</a>, or
53+
<a :href="Links.Zod" target="_blank" title="Zod" class="text-primary">Zod</a>
5554

5655
for schema-based validation.
5756
</li>
@@ -72,4 +71,5 @@ import minimalExample from "@/constants/examples/minimalExample";
7271
import CodeBlock from "@/components/core/CodeBlock.vue";
7372
import InfoIcon from "@/components/svgIcons/InfoIcon.vue";
7473
import InfoPageFooter from "@/components/core/InfoPageFooter.vue";
74+
import Links from "@/constants/Links.ts";
7575
</script>

src/views/gettingStarted/QuickStartView.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<h4>✨ Try Vue-Formik Online</h4>
1212
<p>
1313
To quickly try out Vue-Formik, you can use the online
14-
<router-link to="/playground">playground</router-link>. It is a code editor that allows
15-
you to write Vue-Formik code and see the results in real-time.
14+
<a :href="Links.Playground" target="_blank">playground</a>. It is a code editor that
15+
allows you to write Vue-Formik code and see the results in real-time.
1616
</p>
1717
</article>
1818
</section>
@@ -72,6 +72,7 @@ import CodeBlock from "@/components/core/CodeBlock.vue";
7272
import minimalExample from "@/constants/examples/minimalExample.ts";
7373
import InfoPageFooter from "@/components/core/InfoPageFooter.vue";
7474
import { ref } from "vue";
75+
import Links from "@/constants/Links.ts";
7576
7677
const installCommands = {
7778
npm: `npm i vue-formik`,

src/views/libDocs/composables/useFormik/sections/CustomValidationSection.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<p>
3838
For more complex validation rules, check out the
39-
<router-link to="/playground">Playground</router-link> section. 🔗
39+
<a :href="Links.Playground" target="_blank">playground</a> section. 🔗
4040
</p>
4141
</section>
4242
</template>
@@ -47,4 +47,5 @@ import {
4747
CustomValidationWithEmailArrayExample,
4848
} from "@/constants/examples/validationExamples.ts";
4949
import CodeBlock from "@/components/core/CodeBlock.vue";
50+
import Links from "@/constants/Links.ts";
5051
</script>

0 commit comments

Comments
 (0)