From d48bd388ba9791f652603aaffdec73f5bb60a506 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Tue, 8 Mar 2022 16:43:58 +0800 Subject: [PATCH] chore: cleanup unnecessary files (#494) Signed-off-by: Ryan Wang --- .husky/pre-commit | 2 + src/App.vue | 120 +------------------- src/assets/base.css | 74 ------------ src/assets/logo.svg | 5 +- src/components/.gitkeep | 0 src/components/HelloWorld.vue | 40 ------- src/components/TheWelcome.vue | 93 --------------- src/components/WelcomeItem.vue | 86 -------------- src/components/__tests__/HelloWorld.spec.ts | 11 -- src/components/icons/IconCommunity.vue | 12 -- src/components/icons/IconDocumentation.vue | 12 -- src/components/icons/IconEcosystem.vue | 12 -- src/components/icons/IconSupport.vue | 12 -- src/components/icons/IconTooling.vue | 18 --- src/router/index.ts | 3 - src/views/AboutView.vue | 13 +-- src/views/HomeView.vue | 8 +- src/views/__tests__/HomeView.spec.ts | 11 ++ 18 files changed, 18 insertions(+), 514 deletions(-) delete mode 100644 src/assets/base.css create mode 100644 src/components/.gitkeep delete mode 100644 src/components/HelloWorld.vue delete mode 100644 src/components/TheWelcome.vue delete mode 100644 src/components/WelcomeItem.vue delete mode 100644 src/components/__tests__/HelloWorld.spec.ts delete mode 100644 src/components/icons/IconCommunity.vue delete mode 100644 src/components/icons/IconDocumentation.vue delete mode 100644 src/components/icons/IconEcosystem.vue delete mode 100644 src/components/icons/IconSupport.vue delete mode 100644 src/components/icons/IconTooling.vue create mode 100644 src/views/__tests__/HomeView.spec.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index 707871af..801ef3dd 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,3 +4,5 @@ pnpm test:unit pnpm typecheck pnpm lint + +git add . diff --git a/src/App.vue b/src/App.vue index ce4e17a0..af9c7ac5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,125 +1,7 @@ - - diff --git a/src/assets/base.css b/src/assets/base.css deleted file mode 100644 index 7cad7ad7..00000000 --- a/src/assets/base.css +++ /dev/null @@ -1,74 +0,0 @@ -/* color palette from */ -:root { - --vt-c-white: #ffffff; - --vt-c-white-soft: #f8f8f8; - --vt-c-white-mute: #f2f2f2; - - --vt-c-black: #181818; - --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; - - --vt-c-indigo: #2c3e50; - - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); - --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); - --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); - --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); - - --vt-c-text-light-1: var(--vt-c-indigo); - --vt-c-text-light-2: rgba(60, 60, 60, 0.66); - --vt-c-text-dark-1: var(--vt-c-white); - --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); -} - -/* semantic color variables for this project */ -:root { - --color-background: var(--vt-c-white); - --color-background-soft: var(--vt-c-white-soft); - --color-background-mute: var(--vt-c-white-mute); - - --color-border: var(--vt-c-divider-light-2); - --color-border-hover: var(--vt-c-divider-light-1); - - --color-heading: var(--vt-c-text-light-1); - --color-text: var(--vt-c-text-light-1); - - --section-gap: 160px; -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--vt-c-black); - --color-background-soft: var(--vt-c-black-soft); - --color-background-mute: var(--vt-c-black-mute); - - --color-border: var(--vt-c-divider-dark-2); - --color-border-hover: var(--vt-c-divider-dark-1); - - --color-heading: var(--vt-c-text-dark-1); - --color-text: var(--vt-c-text-dark-2); - } -} - -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - position: relative; - font-weight: normal; -} - -body { - min-height: 100vh; - color: var(--color-text); - background: var(--color-background); - transition: color 0.5s, background-color 0.5s; - line-height: 1.6; - font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, - Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; - font-size: 15px; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} diff --git a/src/assets/logo.svg b/src/assets/logo.svg index 34769084..86fbed95 100644 --- a/src/assets/logo.svg +++ b/src/assets/logo.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/.gitkeep b/src/components/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 49f45a95..00000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/src/components/TheWelcome.vue b/src/components/TheWelcome.vue deleted file mode 100644 index cdaf9421..00000000 --- a/src/components/TheWelcome.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - diff --git a/src/components/WelcomeItem.vue b/src/components/WelcomeItem.vue deleted file mode 100644 index 6cff1946..00000000 --- a/src/components/WelcomeItem.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - diff --git a/src/components/__tests__/HelloWorld.spec.ts b/src/components/__tests__/HelloWorld.spec.ts deleted file mode 100644 index c80503c0..00000000 --- a/src/components/__tests__/HelloWorld.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { mount } from "@vue/test-utils"; -import HelloWorld from "../HelloWorld.vue"; - -describe("HelloWorld", () => { - it("renders properly", () => { - const wrapper = mount(HelloWorld, { props: { msg: "Hello Vitest" } }); - expect(wrapper.text()).toContain("Hello Vitest"); - }); -}); diff --git a/src/components/icons/IconCommunity.vue b/src/components/icons/IconCommunity.vue deleted file mode 100644 index ea8ddefb..00000000 --- a/src/components/icons/IconCommunity.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/src/components/icons/IconDocumentation.vue b/src/components/icons/IconDocumentation.vue deleted file mode 100644 index 63a85340..00000000 --- a/src/components/icons/IconDocumentation.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/src/components/icons/IconEcosystem.vue b/src/components/icons/IconEcosystem.vue deleted file mode 100644 index 385a2029..00000000 --- a/src/components/icons/IconEcosystem.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/src/components/icons/IconSupport.vue b/src/components/icons/IconSupport.vue deleted file mode 100644 index 7db961e4..00000000 --- a/src/components/icons/IconSupport.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/src/components/icons/IconTooling.vue b/src/components/icons/IconTooling.vue deleted file mode 100644 index dfca734d..00000000 --- a/src/components/icons/IconTooling.vue +++ /dev/null @@ -1,18 +0,0 @@ - - diff --git a/src/router/index.ts b/src/router/index.ts index 35612dc5..f46fec2e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -12,9 +12,6 @@ const router = createRouter({ { path: "/about", name: "about", - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. component: () => import("../views/AboutView.vue"), }, ], diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue index 756ad2a1..3a9fed3c 100644 --- a/src/views/AboutView.vue +++ b/src/views/AboutView.vue @@ -1,15 +1,6 @@ - - diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 7b93f88d..fa009e6a 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,9 +1,3 @@ - - diff --git a/src/views/__tests__/HomeView.spec.ts b/src/views/__tests__/HomeView.spec.ts new file mode 100644 index 00000000..6432a64d --- /dev/null +++ b/src/views/__tests__/HomeView.spec.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from "vitest"; + +import { mount } from "@vue/test-utils"; +import HomeView from "../HomeView.vue"; + +describe("HomeView", () => { + it("renders properly", () => { + const wrapper = mount(HomeView); + expect(wrapper.text()).toContain("Hello Halo!"); + }); +});