Skip to content

Commit c109d91

Browse files
committed
13Jul24 run prettier and add prettier ignore
1 parent b1cbe8b commit c109d91

15 files changed

+70
-79
lines changed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/views/introduction/DynamicAttributes.vue

src/App.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ watch(
4141
:name="example.name"
4242
/>
4343
</div>
44-
<!-- <RouterButton to-path="/test" name="test me" />-->
44+
<!-- <RouterButton to-path="/test" name="test me" />-->
4545

46-
<p class="text-gray-800 font-bold text-center dark:text-neutral-400 text-sm">
46+
<p
47+
class="text-center text-sm font-bold text-gray-800 dark:text-neutral-400"
48+
>
4749
<a href="https://github.com/vchan14/MyVueExamples" target="_blank">
4850
<img class="inline w-4" :src="githubIcon" alt="github icon" />
4951
</a>

src/exampleButtons.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { StyleButtonExamples } from "@/factory/StylesFactory.js";
44
import { RenderingButtonExamples } from "@/factory/RenderingFactory.js";
55
// import { OthersButtonExamples } from "@/factory/OthersFactory.js";
66
import { PropsButtonExamples } from "@/factory/PropsFactory.js";
7-
import {EventHandlingExamples} from "@/factory/EventHandlingFactory.js";
7+
import { EventHandlingExamples } from "@/factory/EventHandlingFactory.js";
88

99
export const ALL_EXAMPLES = [
1010
IntroductionButtonExamples,

src/factory/EventHandlingFactory.js

+18-15
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ const path = "/src/views/eventhandling/";
44
const sectionName = "Event Handling";
55
const link = "https://vuejs.org/guide/essentials/event-handling.html";
66

7-
const singleFileComponents = import.meta.glob("/src/views/eventhandling/*.vue", {
8-
eager: true,
9-
query: "?raw",
10-
import: "default",
11-
});
12-
7+
const singleFileComponents = import.meta.glob(
8+
"/src/views/eventhandling/*.vue",
9+
{
10+
eager: true,
11+
query: "?raw",
12+
import: "default",
13+
},
14+
);
1315

1416
// Import components from folders
1517
const folderComponents = import.meta.glob("/src/views/eventhandling/*/*.vue", {
@@ -18,14 +20,15 @@ const folderComponents = import.meta.glob("/src/views/eventhandling/*/*.vue", {
1820
import: "default",
1921
});
2022

21-
const { ButtonExamples: EventHandlingExamples, RouterList: EventHandlingRouterList } =
22-
generateButtonExamplesAndRouterList(
23-
path,
24-
singleFileComponents,
25-
folderComponents,
26-
sectionName,
27-
link,
28-
);
23+
const {
24+
ButtonExamples: EventHandlingExamples,
25+
RouterList: EventHandlingRouterList,
26+
} = generateButtonExamplesAndRouterList(
27+
path,
28+
singleFileComponents,
29+
folderComponents,
30+
sectionName,
31+
link,
32+
);
2933

3034
export { EventHandlingExamples, EventHandlingRouterList };
31-

src/factory/IntroductionFactory.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { generateButtonExamplesAndRouterList } from "@/factoryUtil.js";
22

3-
43
const orderedList = [
54
"Hello World",
65
"Raw Html",
@@ -26,17 +25,17 @@ const folderComponents = import.meta.glob("/src/views/introduction/*/*.vue", {
2625
import: "default",
2726
});
2827

29-
const { ButtonExamples: IntroductionButtonExamples, RouterList: IntroductionRouterList } =
30-
generateButtonExamplesAndRouterList(
31-
path,
32-
singleFileComponents,
33-
folderComponents,
34-
sectionName,
35-
link,
36-
orderedList,
37-
);
38-
28+
const {
29+
ButtonExamples: IntroductionButtonExamples,
30+
RouterList: IntroductionRouterList,
31+
} = generateButtonExamplesAndRouterList(
32+
path,
33+
singleFileComponents,
34+
folderComponents,
35+
sectionName,
36+
link,
37+
orderedList,
38+
);
3939

4040
console.log(IntroductionButtonExamples, IntroductionRouterList);
4141
export { IntroductionButtonExamples, IntroductionRouterList };
42-

src/factory/OthersFactory.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
const orderedList = [
2-
];
3-
1+
const orderedList = [];
42

53
import { generateButtonExamplesAndRouterList } from "@/factoryUtil.js";
64

7-
85
const path = "/src/views/styles/";
96
const sectionName = "Others";
107
const link = "https://vuejs.org/guide/essentials/class-and-style.html";
@@ -31,8 +28,4 @@ const { ButtonExamples: OthersButtonExamples, RouterList: othersRouterList } =
3128
orderedList,
3229
);
3330

34-
3531
export { OthersButtonExamples, othersRouterList };
36-
37-
38-

src/factory/ReativityFactory.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const orderedList = ["Reactive Primitives", "Reactive Objects", "Computed Ref"];
22

33
import { generateButtonExamplesAndRouterList } from "@/factoryUtil.js";
44

5-
65
const path = "/src/views/reactivity/";
76
const sectionName = "Reactivity";
87
const link = "https://vuejs.org/guide/essentials/reactivity-fundamentals.html";
@@ -19,16 +18,16 @@ const folderComponents = import.meta.glob("/src/views/reactivity/*/*.vue", {
1918
import: "default",
2019
});
2120

22-
const { ButtonExamples: ReactivityButtonExamples, RouterList: ReactivityRouterList } =
23-
generateButtonExamplesAndRouterList(
24-
path,
25-
singleFileComponents,
26-
folderComponents,
27-
sectionName,
28-
link,
29-
orderedList,
30-
);
31-
21+
const {
22+
ButtonExamples: ReactivityButtonExamples,
23+
RouterList: ReactivityRouterList,
24+
} = generateButtonExamplesAndRouterList(
25+
path,
26+
singleFileComponents,
27+
folderComponents,
28+
sectionName,
29+
link,
30+
orderedList,
31+
);
3232

3333
export { ReactivityButtonExamples, ReactivityRouterList };
34-

src/factory/RenderingFactory.js

+11-13
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const orderedList = [
77

88
import { generateButtonExamplesAndRouterList } from "@/factoryUtil.js";
99

10-
1110
const path = "/src/views/rendering/";
1211
const sectionName = "Rendering";
1312
const link = "https://vuejs.org/guide/essentials/conditional.html";
@@ -24,17 +23,16 @@ const folderComponents = import.meta.glob("/src/views/rendering/*/*.vue", {
2423
import: "default",
2524
});
2625

27-
const { ButtonExamples: RenderingButtonExamples, RouterList: RenderingRouterList } =
28-
generateButtonExamplesAndRouterList(
29-
path,
30-
singleFileComponents,
31-
folderComponents,
32-
sectionName,
33-
link,
34-
orderedList,
35-
);
36-
26+
const {
27+
ButtonExamples: RenderingButtonExamples,
28+
RouterList: RenderingRouterList,
29+
} = generateButtonExamplesAndRouterList(
30+
path,
31+
singleFileComponents,
32+
folderComponents,
33+
sectionName,
34+
link,
35+
orderedList,
36+
);
3737

3838
export { RenderingButtonExamples, RenderingRouterList };
39-
40-

src/factory/StylesFactory.js

-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ const orderedList = [
66
"Scoped Styles",
77
];
88

9-
109
import { generateButtonExamplesAndRouterList } from "@/factoryUtil.js";
1110

12-
1311
const path = "/src/views/styles/";
1412
const sectionName = "Styles";
1513
const link = "https://vuejs.org/guide/essentials/class-and-style.html";
@@ -36,7 +34,4 @@ const { ButtonExamples: StyleButtonExamples, RouterList: StyleRouterList } =
3634
orderedList,
3735
);
3836

39-
4037
export { StyleButtonExamples, StyleRouterList };
41-
42-

src/factoryUtil.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ export function generateButtonExamplesAndRouterList(
2525
orderedList = [],
2626
) {
2727
// Generate examples and router objects for single file components
28-
const filenames = Object.keys(singleFileComponents).map((key) => { return key.replace(basePath, "").replace(".vue", ""); });
28+
const filenames = Object.keys(singleFileComponents).map((key) => {
29+
return key.replace(basePath, "").replace(".vue", "");
30+
});
2931

3032
let exampleList = filenames.map((filename) => createExample(filename));
3133

32-
33-
let routerList = filenames.map(filename => createRouterObj(filename, singleFileComponents, basePath));
34+
let routerList = filenames.map((filename) =>
35+
createRouterObj(filename, singleFileComponents, basePath),
36+
);
3437

3538
// Extract folder names and generate examples for them
3639
const folderNames = extractUniqueFolderNames(folderComponents);

src/router/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { RenderingRouterList } from "@/factory/RenderingFactory.js";
66
import TestView from "@/views/TestView.vue";
77
// import { othersRouterList } from "@/factory/OthersFactory.js";
88
import { PropsRouterList } from "@/factory/PropsFactory.js";
9-
import {EventHandlingRouterList} from "@/factory/EventHandlingFactory.js";
9+
import { EventHandlingRouterList } from "@/factory/EventHandlingFactory.js";
1010

1111
const router = createRouter({
1212
history: createWebHistory(import.meta.env.BASE_URL),

src/views/eventhandling/BasicEventHandling.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ function incrementCount(event) {
1919
count.value++;
2020
console.log("Event:", event);
2121
}
22-
</script>
22+
</script>

src/views/introduction/DynamicAttributes.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
</template>
77

88
<script setup>
9-
const rickGif =
10-
"https://media.tenor.com/xo0jvr4bbTMAAAAi/rick-astley-rickroll.gif";
9+
const rickGif = "https://media.tenor.com/xo0jvr4bbTMAAAAi/rick-astley-rickroll.gif";
1110
const rickAlt = "Rick Astley";
1211
13-
const catGif =
14-
"https://media.glamour.com/photos/580e1dc07a52574c7ef91071/master/w_2580%2Cc_limit/giphy%2520(1).gif";
12+
const catGif = "https://media.glamour.com/photos/580e1dc07a52574c7ef91071/master/w_2580%2Cc_limit/giphy%2520(1).gif";
1513
const catAlt = "cat";
1614
</script>
1715

src/views/rendering/IfConditional.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ const user = ref({ loggedIn: false });
1313
const toggle = () => {
1414
user.value.loggedIn = !user.value.loggedIn;
1515
};
16-
</script>
16+
</script>

src/views/rendering/VShowDirective.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const toggleIf = ref(true);
3333
.container div {
3434
display: flex;
3535
}
36-
</style>
36+
</style>

0 commit comments

Comments
 (0)