diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 5852394..eb0b6d4 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -69,9 +69,9 @@ members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +available at [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq + diff --git a/build/vite/index.ts b/build/vite/index.ts index 472dce3..a05645b 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -22,7 +22,7 @@ export function createVitePlugins() { VueRouter({ extensions: ['.vue'], routesFolder: 'src/pages', - dts: 'src/typed-router.d.ts', + dts: 'src/types/typed-router.d.ts', }), vue(), @@ -38,7 +38,7 @@ export function createVitePlugins() { extensions: ['vue'], resolvers: [VantResolver()], include: [/\.vue$/, /\.vue\?vue/], - dts: 'src/components.d.ts', + dts: 'src/types/components.d.ts', }), // https://github.com/antfu/unplugin-auto-import @@ -60,7 +60,7 @@ export function createVitePlugins() { }, unheadVueComposablesImports, ], - dts: 'src/auto-imports.d.ts', + dts: 'src/types/auto-imports.d.ts', dirs: [ 'src/composables', ], diff --git a/src/auto-imports.d.ts b/src/types/auto-imports.d.ts similarity index 98% rename from src/auto-imports.d.ts rename to src/types/auto-imports.d.ts index 19676f5..592727d 100644 --- a/src/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -49,7 +49,7 @@ declare global { const inject: typeof import('vue')['inject'] const injectHead: typeof import('@unhead/vue')['injectHead'] const injectLocal: typeof import('@vueuse/core')['injectLocal'] - const isDark: typeof import('./composables/dark')['isDark'] + const isDark: typeof import('../composables/dark')['isDark'] const isDefined: typeof import('@vueuse/core')['isDefined'] const isProxy: typeof import('vue')['isProxy'] const isReactive: typeof import('vue')['isReactive'] @@ -80,7 +80,7 @@ declare global { const onUnmounted: typeof import('vue')['onUnmounted'] const onUpdated: typeof import('vue')['onUpdated'] const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] - const preferredDark: typeof import('./composables/dark')['preferredDark'] + const preferredDark: typeof import('../composables/dark')['preferredDark'] const provide: typeof import('vue')['provide'] const provideLocal: typeof import('@vueuse/core')['provideLocal'] const reactify: typeof import('@vueuse/core')['reactify'] @@ -114,7 +114,7 @@ declare global { const toRef: typeof import('vue')['toRef'] const toRefs: typeof import('vue')['toRefs'] const toValue: typeof import('vue')['toValue'] - const toggleDark: typeof import('./composables/dark')['toggleDark'] + const toggleDark: typeof import('../composables/dark')['toggleDark'] const triggerRef: typeof import('vue')['triggerRef'] const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount'] const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount'] diff --git a/src/components.d.ts b/src/types/components.d.ts similarity index 85% rename from src/components.d.ts rename to src/types/components.d.ts index df3f4b7..cae69c8 100644 --- a/src/components.d.ts +++ b/src/types/components.d.ts @@ -7,11 +7,11 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { - Chart: typeof import('./components/Chart/index.vue')['default'] - NavBar: typeof import('./components/NavBar.vue')['default'] + Chart: typeof import('./../components/Chart/index.vue')['default'] + NavBar: typeof import('./../components/NavBar.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - TabBar: typeof import('./components/TabBar.vue')['default'] + TabBar: typeof import('./../components/TabBar.vue')['default'] VanButton: typeof import('vant/es')['Button'] VanCell: typeof import('vant/es')['Cell'] VanCellGroup: typeof import('vant/es')['CellGroup'] diff --git a/src/env.d.ts b/src/types/env.d.ts similarity index 100% rename from src/env.d.ts rename to src/types/env.d.ts diff --git a/src/typed-router.d.ts b/src/types/typed-router.d.ts similarity index 100% rename from src/typed-router.d.ts rename to src/types/typed-router.d.ts diff --git a/src/vue-router.d.ts b/src/types/vue-router.d.ts similarity index 100% rename from src/vue-router.d.ts rename to src/types/vue-router.d.ts diff --git a/src/typing.ts b/src/typing.ts deleted file mode 100644 index 2a319f9..0000000 --- a/src/typing.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Ref } from 'vue' - -export type MaybeRef = T | Ref