From cbb14e0916035b730497403d45900293be877d50 Mon Sep 17 00:00:00 2001 From: "zzs01@yunemao.com" Date: Thu, 12 Sep 2024 16:45:22 +0800 Subject: [PATCH] config --- src/components/README.md | 9 --------- src/pages/README.md | 20 -------------------- src/pages/[...all].vue | 5 ----- src/pages/hi/[name].vue | 22 ---------------------- test/__snapshots__/component.test.ts.snap | 3 --- test/basic.test.ts | 7 ------- test/component.test.ts | 22 ---------------------- typed-router.d.ts | 2 -- uno.config.ts | 15 +++++++-------- vite.config.ts | 5 ----- 10 files changed, 7 insertions(+), 103 deletions(-) delete mode 100644 src/components/README.md delete mode 100644 src/pages/README.md delete mode 100755 src/pages/[...all].vue delete mode 100644 src/pages/hi/[name].vue delete mode 100644 test/__snapshots__/component.test.ts.snap delete mode 100644 test/basic.test.ts delete mode 100644 test/component.test.ts diff --git a/src/components/README.md b/src/components/README.md deleted file mode 100644 index ccafa35..0000000 --- a/src/components/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Components - -Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components). - -### Icons - -You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/). - -It will only bundle the icons you use. Check out [`unplugin-icons`](https://github.com/antfu/unplugin-icons) for more details. diff --git a/src/pages/README.md b/src/pages/README.md deleted file mode 100644 index 26b343d..0000000 --- a/src/pages/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## File-based Routing - -Routes will be auto-generated for Vue files in this dir with the same file structure. -Check out [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) for more details. - -### Path Aliasing - -`~/` is aliased to `./src/` folder. - -For example, instead of having - -```ts -import { isDark } from '../../../../composables' -``` - -now, you can use - -```ts -import { isDark } from '~/composables' -``` diff --git a/src/pages/[...all].vue b/src/pages/[...all].vue deleted file mode 100755 index 241e7e2..0000000 --- a/src/pages/[...all].vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/src/pages/hi/[name].vue b/src/pages/hi/[name].vue deleted file mode 100644 index c8215da..0000000 --- a/src/pages/hi/[name].vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/test/__snapshots__/component.test.ts.snap b/test/__snapshots__/component.test.ts.snap deleted file mode 100644 index 7cf5ab5..0000000 --- a/test/__snapshots__/component.test.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`component of TheCounter.vue > should render 1`] = `"
10
"`; diff --git a/test/basic.test.ts b/test/basic.test.ts deleted file mode 100644 index 90b716f..0000000 --- a/test/basic.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, expect, it } from 'vitest' - -describe('hi', () => { - it('should works', () => { - expect(1 + 1).toEqual(2) - }) -}) diff --git a/test/component.test.ts b/test/component.test.ts deleted file mode 100644 index 8cfd05e..0000000 --- a/test/component.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { mount } from '@vue/test-utils' -import { describe, expect, it } from 'vitest' -import TheCounter from '../src/components/TheCounter.vue' - -describe('component of TheCounter.vue', () => { - it('should render', () => { - const wrapper = mount(TheCounter, { props: { initial: 10 } }) - expect(wrapper.text()).toContain('10') - expect(wrapper.html()).toMatchSnapshot() - }) - - it('should be interactive', async () => { - const wrapper = mount(TheCounter, { props: { initial: 0 } }) - expect(wrapper.text()).toContain('0') - - expect(wrapper.find('.inc').exists()).toBe(true) - - await wrapper.get('button').trigger('click') - - expect(wrapper.text()).toContain('1') - }) -}) diff --git a/typed-router.d.ts b/typed-router.d.ts index 9baa733..331ee51 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -19,7 +19,5 @@ declare module 'vue-router/auto-routes' { */ export interface RouteNamedMap { '/': RouteRecordInfo<'/', '/', Record, Record>, - '/[...all]': RouteRecordInfo<'/[...all]', '/:all(.*)', { all: ParamValue }, { all: ParamValue }>, - '/hi/[name]': RouteRecordInfo<'/hi/[name]', '/hi/:name', { name: ParamValue }, { name: ParamValue }>, } } diff --git a/uno.config.ts b/uno.config.ts index 4e66c1f..c1d6b51 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -3,7 +3,6 @@ import { presetAttributify, presetIcons, presetUno, - presetWebFonts, } from 'unocss' export default defineConfig({ @@ -18,12 +17,12 @@ export default defineConfig({ scale: 1.2, warn: true, }), - presetWebFonts({ - fonts: { - sans: 'DM Sans', - serif: 'DM Serif Display', - mono: 'DM Mono', - }, - }), + // presetWebFonts({ + // fonts: { + // sans: 'DM Sans', + // serif: 'DM Serif Display', + // mono: 'DM Mono', + // }, + // }), ], }) diff --git a/vite.config.ts b/vite.config.ts index 3c03c1b..e0a6f2c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -60,9 +60,4 @@ export default defineConfig({ // see uno.config.ts for config UnoCSS(), ], - - // https://github.com/vitest-dev/vitest - test: { - environment: 'jsdom', - }, })