Skip to content

Commit 9a92800

Browse files
committed
chore: simplify ts-router folder structure
1 parent 6fabade commit 9a92800

File tree

13 files changed

+98
-407
lines changed

13 files changed

+98
-407
lines changed

template/code/typescript-router/src/App.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import HelloWorld from '@/components/HelloWorld.vue'
3-
import ColorSchemeSwitch from '@/components/ColorSchemeSwitch.vue'
43
</script>
54

65
<template>
@@ -9,7 +8,6 @@ import ColorSchemeSwitch from '@/components/ColorSchemeSwitch.vue'
98

109
<div class="wrapper">
1110
<HelloWorld msg="You did it!" />
12-
<ColorSchemeSwitch />
1311

1412
<div id="nav">
1513
<router-link to="/">Home</router-link>

template/code/typescript-router/src/assets/base.css

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,18 @@
3636
--section-gap: 160px;
3737
}
3838

39-
[data-color-scheme='dark'] {
40-
--color-background: var(--vt-c-black);
41-
--color-background-soft: var(--vt-c-black-soft);
42-
--color-background-mute: var(--vt-c-black-mute);
39+
@media (prefers-color-scheme: dark) {
40+
:root {
41+
--color-background: var(--vt-c-black);
42+
--color-background-soft: var(--vt-c-black-soft);
43+
--color-background-mute: var(--vt-c-black-mute);
4344

44-
--color-border: var(--vt-c-divider-dark-2);
45-
--color-border-hover: var(--vt-c-divider-dark-1);
45+
--color-border: var(--vt-c-divider-dark-2);
46+
--color-border-hover: var(--vt-c-divider-dark-1);
4647

47-
--color-heading: var(--vt-c-text-dark-1);
48-
--color-text: var(--vt-c-text-dark-2);
48+
--color-heading: var(--vt-c-text-dark-1);
49+
--color-text: var(--vt-c-text-dark-2);
50+
}
4951
}
5052

5153
*,

template/code/typescript-router/src/components/ColorSchemeSwitch.vue

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

template/code/typescript-router/src/components/HelloWorld.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defineProps<{
1010
<h3>
1111
You’ve successfully created a project with
1212
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
13-
<a target="_blank" href="https://v3.vuejs.org/">Vue 3</a>.
13+
<a target="_blank" href="https://v3.vuejs.org/">Vue 3</a>. What's next?
1414
</h3>
1515
</div>
1616
</template>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<script setup lang="ts">
2+
import WelcomeItem from './WelcomeItem.vue'
3+
import DocumentationIcon from './icons/IconDocumentation.vue'
4+
import ToolingIcon from './icons/IconTooling.vue'
5+
import EcosystemIcon from './icons/IconEcosystem.vue'
6+
import CommunityIcon from './icons/IconCommunity.vue'
7+
import SupportIcon from './icons/IconSupport.vue'
8+
</script>
9+
10+
<template>
11+
<WelcomeItem>
12+
<template #icon>
13+
<DocumentationIcon />
14+
</template>
15+
<template #heading>Documentation</template>
16+
17+
Widely regarded as one of the best, Vue’s
18+
<a target="_blank" href="https://v3.vuejs.org/">official documentation</a>
19+
will provide you with all information you need to get started. Whether you’re already a Vue
20+
veteran or just trying the framework out, great chances are you’ll find the answer to your next
21+
question there.
22+
</WelcomeItem>
23+
24+
<WelcomeItem>
25+
<template #icon>
26+
<ToolingIcon />
27+
</template>
28+
<template #heading>Tooling</template>
29+
30+
This project is served and bundled with
31+
<a href="https://vitejs.dev/guide/features.html" target="_blank">Vite</a>. The recommended IDE
32+
setup is <a href="https://code.visualstudio.com/" target="_blank">VSCode</a> +
33+
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
34+
your components and web pages, check out
35+
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
36+
<a href="https://docs.cypress.io/guides/component-testing/introduction" target="_blank"
37+
>Cypress Component Testing</a
38+
>.
39+
40+
<br />
41+
42+
More instructions are available in <code>README.md</code>.
43+
</WelcomeItem>
44+
45+
<WelcomeItem>
46+
<template #icon>
47+
<EcosystemIcon />
48+
</template>
49+
<template #heading>Ecosystem</template>
50+
51+
Get official tools and libraries for your project:
52+
<a target="_blank" href="https://next.vuex.vuejs.org/">Vuex</a>,
53+
<a target="_blank" href="https://next.router.vuejs.org/">Vue Router</a>,
54+
<a target="_blank" href="https://next.vue-test-utils.vuejs.org/">Vue Test Utils</a>, and
55+
<a target="_blank" href="https://github.com/vuejs/devtools">Vue Dev Tools</a>. If you need more
56+
resources, we suggest paying
57+
<a target="_blank" href="https://github.com/vuejs/awesome-vue">Awesome Vue</a>
58+
a visit.
59+
</WelcomeItem>
60+
61+
<WelcomeItem>
62+
<template #icon>
63+
<CommunityIcon />
64+
</template>
65+
<template #heading>Community</template>
66+
67+
Got stuck? Ask your question on
68+
<a target="_blank" href="https://chat.vuejs.org">Vue Land</a>, our official Discord server, or
69+
<a target="_blank" href="https://stackoverflow.com/questions/tagged/vue.js">StackOverflow</a>.
70+
You should also subscribe to
71+
<a target="_blank" href="https://news.vuejs.org">our mailing list</a> for latest news in the Vue
72+
world.
73+
</WelcomeItem>
74+
75+
<WelcomeItem>
76+
<template #icon>
77+
<SupportIcon />
78+
</template>
79+
<template #heading>Support Vue</template>
80+
81+
As an independent project, Vue relies on community backing for its sustainability. You can help
82+
us by
83+
<a target="_blank" href="https://vuejs.org/support-vuejs/">becoming a sponsor</a>.
84+
</WelcomeItem>
85+
</template>

template/code/typescript-router/src/components/__tests__/ColorSchemeSwitch.spec.ts

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

template/code/typescript-router/src/components/icons/IconMoon.vue

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

template/code/typescript-router/src/components/icons/IconSun.vue

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

template/code/typescript-router/src/composables/__tests__/useMediaQuery.spec.ts

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

0 commit comments

Comments
 (0)