refactor: clean up boilerplate

This commit is contained in:
liyasthomas
2021-11-30 18:52:28 +05:30
parent c3fcc6e35d
commit 190a4c43ef
8 changed files with 216 additions and 371 deletions

View File

@@ -3,18 +3,22 @@
"scripts": {
"build": "cross-env NODE_ENV=production vite-ssg build",
"dev": "vite --port 3333 --open",
"lintfix": "eslint \"**/*.{vue,ts,js}\" --fix",
"lint": "eslint \"**/*.{vue,ts,js}\"",
"test": "cypress open",
"preview": "vite preview",
"preview-https": "serve dist",
"typecheck": "vue-tsc --noEmit"
"typecheck": "vue-tsc --noEmit",
"do-lint": "pnpm run lint",
"do-lintfix": "pnpm run lintfix",
"do-build-prod": "pnpm run build",
"do-test": "pnpm run test"
},
"dependencies": {
"@vueuse/core": "^7.1.2",
"@vueuse/head": "^0.7.2",
"nprogress": "^0.2.0",
"pinia": "^2.0.4",
"prism-theme-vars": "^0.2.2",
"vue": "^3.2.23",
"vue-demi": "^0.12.1",
"vue-i18n": "^9.1.9",
@@ -24,7 +28,6 @@
"@antfu/eslint-config": "^0.11.1",
"@iconify-json/carbon": "^1.0.11",
"@intlify/vite-plugin-vue-i18n": "^3.2.1",
"@types/markdown-it-link-attributes": "^3.0.1",
"@types/nprogress": "^0.2.0",
"@vitejs/plugin-vue": "^1.10.1",
"@vue/compiler-sfc": "^3.2.23",
@@ -35,8 +38,6 @@
"eslint": "^8.3.0",
"eslint-plugin-cypress": "^2.12.1",
"https-localhost": "^4.7.0",
"markdown-it-link-attributes": "^3.0.0",
"markdown-it-prism": "^2.2.1",
"pnpm": "^6.23.2",
"typescript": "^4.5.2",
"unplugin-auto-import": "^0.4.20",

View File

@@ -1,195 +1,195 @@
// Generated by 'unplugin-auto-import'
// We suggest you to commit this file into source control
declare global {
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const biSyncRef: typeof import('@vueuse/core')['biSyncRef']
const computed: typeof import('vue')['computed']
const computedInject: typeof import('@vueuse/core')['computedInject']
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
const controlledRef: typeof import('@vueuse/core')['controlledRef']
const createApp: typeof import('vue')['createApp']
const createEventHook: typeof import('@vueuse/core')['createEventHook']
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
const customRef: typeof import('vue')['customRef']
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
const effectScope: typeof import('vue')['effectScope']
const EffectScope: typeof import('vue')['EffectScope']
const extendRef: typeof import('@vueuse/core')['extendRef']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const inject: typeof import('vue')['inject']
const isDefined: typeof import('@vueuse/core')['isDefined']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
const provide: typeof import('vue')['provide']
const reactify: typeof import('@vueuse/core')['reactify']
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
const reactive: typeof import('vue')['reactive']
const reactivePick: typeof import('@vueuse/core')['reactivePick']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const refDefault: typeof import('@vueuse/core')['refDefault']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const syncRef: typeof import('@vueuse/core')['syncRef']
const templateRef: typeof import('@vueuse/core')['templateRef']
const throttledRef: typeof import('@vueuse/core')['throttledRef']
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
const toRaw: typeof import('vue')['toRaw']
const toReactive: typeof import('@vueuse/core')['toReactive']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const triggerRef: typeof import('vue')['triggerRef']
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
const unref: typeof import('vue')['unref']
const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useAttrs: typeof import('vue')['useAttrs']
const useBase64: typeof import('@vueuse/core')['useBase64']
const useBattery: typeof import('@vueuse/core')['useBattery']
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
const useClamp: typeof import('@vueuse/core')['useClamp']
const useClipboard: typeof import('@vueuse/core')['useClipboard']
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
const useCounter: typeof import('@vueuse/core')['useCounter']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVar: typeof import('@vueuse/core')['useCssVar']
const useDark: typeof import('@vueuse/core')['useDark']
const useDebounce: typeof import('@vueuse/core')['useDebounce']
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
const useDraggable: typeof import('@vueuse/core')['useDraggable']
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
const useElementHover: typeof import('@vueuse/core')['useElementHover']
const useElementSize: typeof import('@vueuse/core')['useElementSize']
const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
const useEventBus: typeof import('@vueuse/core')['useEventBus']
const useEventListener: typeof import('@vueuse/core')['useEventListener']
const useEventSource: typeof import('@vueuse/core')['useEventSource']
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
const useFavicon: typeof import('@vueuse/core')['useFavicon']
const useFetch: typeof import('@vueuse/core')['useFetch']
const useFocus: typeof import('@vueuse/core')['useFocus']
const useFps: typeof import('@vueuse/core')['useFps']
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
const useHead: typeof import('@vueuse/head')['useHead']
const useI18n: typeof import('vue-i18n')['useI18n']
const useIdle: typeof import('@vueuse/core')['useIdle']
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
const useInterval: typeof import('@vueuse/core')['useInterval']
const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
const useMemory: typeof import('@vueuse/core')['useMemory']
const useMounted: typeof import('@vueuse/core')['useMounted']
const useMouse: typeof import('@vueuse/core')['useMouse']
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
const useNetwork: typeof import('@vueuse/core')['useNetwork']
const useNow: typeof import('@vueuse/core')['useNow']
const useOnline: typeof import('@vueuse/core')['useOnline']
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
const useParallax: typeof import('@vueuse/core')['useParallax']
const usePermission: typeof import('@vueuse/core')['usePermission']
const usePointer: typeof import('@vueuse/core')['usePointer']
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
const useRafFn: typeof import('@vueuse/core')['useRafFn']
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
const useScroll: typeof import('@vueuse/core')['useScroll']
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
const useShare: typeof import('@vueuse/core')['useShare']
const useSlots: typeof import('vue')['useSlots']
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
const useStorage: typeof import('@vueuse/core')['useStorage']
const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useThrottle: typeof import('@vueuse/core')['useThrottle']
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
const useTimeout: typeof import('@vueuse/core')['useTimeout']
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
const useTitle: typeof import('@vueuse/core')['useTitle']
const useToggle: typeof import('@vueuse/core')['useToggle']
const useTransition: typeof import('@vueuse/core')['useTransition']
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
const useVModel: typeof import('@vueuse/core')['useVModel']
const useVModels: typeof import('@vueuse/core')['useVModels']
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
const watch: typeof import('vue')['watch']
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
const watchEffect: typeof import('vue')['watchEffect']
const watchOnce: typeof import('@vueuse/core')['watchOnce']
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const whenever: typeof import('@vueuse/core')['whenever']
const asyncComputed: typeof import("@vueuse/core")["asyncComputed"]
const autoResetRef: typeof import("@vueuse/core")["autoResetRef"]
const biSyncRef: typeof import("@vueuse/core")["biSyncRef"]
const computed: typeof import("vue")["computed"]
const computedInject: typeof import("@vueuse/core")["computedInject"]
const controlledComputed: typeof import("@vueuse/core")["controlledComputed"]
const controlledRef: typeof import("@vueuse/core")["controlledRef"]
const createApp: typeof import("vue")["createApp"]
const createEventHook: typeof import("@vueuse/core")["createEventHook"]
const createGlobalState: typeof import("@vueuse/core")["createGlobalState"]
const createReactiveFn: typeof import("@vueuse/core")["createReactiveFn"]
const createSharedComposable: typeof import("@vueuse/core")["createSharedComposable"]
const createUnrefFn: typeof import("@vueuse/core")["createUnrefFn"]
const customRef: typeof import("vue")["customRef"]
const debouncedRef: typeof import("@vueuse/core")["debouncedRef"]
const debouncedWatch: typeof import("@vueuse/core")["debouncedWatch"]
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"]
const defineComponent: typeof import("vue")["defineComponent"]
const eagerComputed: typeof import("@vueuse/core")["eagerComputed"]
const effectScope: typeof import("vue")["effectScope"]
const EffectScope: typeof import("vue")["EffectScope"]
const extendRef: typeof import("@vueuse/core")["extendRef"]
const getCurrentInstance: typeof import("vue")["getCurrentInstance"]
const getCurrentScope: typeof import("vue")["getCurrentScope"]
const h: typeof import("vue")["h"]
const ignorableWatch: typeof import("@vueuse/core")["ignorableWatch"]
const inject: typeof import("vue")["inject"]
const isDefined: typeof import("@vueuse/core")["isDefined"]
const isReadonly: typeof import("vue")["isReadonly"]
const isRef: typeof import("vue")["isRef"]
const makeDestructurable: typeof import("@vueuse/core")["makeDestructurable"]
const markRaw: typeof import("vue")["markRaw"]
const nextTick: typeof import("vue")["nextTick"]
const onActivated: typeof import("vue")["onActivated"]
const onBeforeMount: typeof import("vue")["onBeforeMount"]
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"]
const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"]
const onClickOutside: typeof import("@vueuse/core")["onClickOutside"]
const onDeactivated: typeof import("vue")["onDeactivated"]
const onErrorCaptured: typeof import("vue")["onErrorCaptured"]
const onKeyStroke: typeof import("@vueuse/core")["onKeyStroke"]
const onMounted: typeof import("vue")["onMounted"]
const onRenderTracked: typeof import("vue")["onRenderTracked"]
const onRenderTriggered: typeof import("vue")["onRenderTriggered"]
const onScopeDispose: typeof import("vue")["onScopeDispose"]
const onServerPrefetch: typeof import("vue")["onServerPrefetch"]
const onStartTyping: typeof import("@vueuse/core")["onStartTyping"]
const onUnmounted: typeof import("vue")["onUnmounted"]
const onUpdated: typeof import("vue")["onUpdated"]
const pausableWatch: typeof import("@vueuse/core")["pausableWatch"]
const provide: typeof import("vue")["provide"]
const reactify: typeof import("@vueuse/core")["reactify"]
const reactifyObject: typeof import("@vueuse/core")["reactifyObject"]
const reactive: typeof import("vue")["reactive"]
const reactivePick: typeof import("@vueuse/core")["reactivePick"]
const readonly: typeof import("vue")["readonly"]
const ref: typeof import("vue")["ref"]
const refDefault: typeof import("@vueuse/core")["refDefault"]
const shallowReactive: typeof import("vue")["shallowReactive"]
const shallowReadonly: typeof import("vue")["shallowReadonly"]
const shallowRef: typeof import("vue")["shallowRef"]
const syncRef: typeof import("@vueuse/core")["syncRef"]
const templateRef: typeof import("@vueuse/core")["templateRef"]
const throttledRef: typeof import("@vueuse/core")["throttledRef"]
const throttledWatch: typeof import("@vueuse/core")["throttledWatch"]
const toRaw: typeof import("vue")["toRaw"]
const toReactive: typeof import("@vueuse/core")["toReactive"]
const toRef: typeof import("vue")["toRef"]
const toRefs: typeof import("vue")["toRefs"]
const triggerRef: typeof import("vue")["triggerRef"]
const tryOnBeforeUnmount: typeof import("@vueuse/core")["tryOnBeforeUnmount"]
const tryOnMounted: typeof import("@vueuse/core")["tryOnMounted"]
const tryOnScopeDispose: typeof import("@vueuse/core")["tryOnScopeDispose"]
const tryOnUnmounted: typeof import("@vueuse/core")["tryOnUnmounted"]
const unref: typeof import("vue")["unref"]
const unrefElement: typeof import("@vueuse/core")["unrefElement"]
const until: typeof import("@vueuse/core")["until"]
const useActiveElement: typeof import("@vueuse/core")["useActiveElement"]
const useAsyncQueue: typeof import("@vueuse/core")["useAsyncQueue"]
const useAsyncState: typeof import("@vueuse/core")["useAsyncState"]
const useAttrs: typeof import("vue")["useAttrs"]
const useBase64: typeof import("@vueuse/core")["useBase64"]
const useBattery: typeof import("@vueuse/core")["useBattery"]
const useBreakpoints: typeof import("@vueuse/core")["useBreakpoints"]
const useBrowserLocation: typeof import("@vueuse/core")["useBrowserLocation"]
const useClamp: typeof import("@vueuse/core")["useClamp"]
const useClipboard: typeof import("@vueuse/core")["useClipboard"]
const useConfirmDialog: typeof import("@vueuse/core")["useConfirmDialog"]
const useCounter: typeof import("@vueuse/core")["useCounter"]
const useCssModule: typeof import("vue")["useCssModule"]
const useCssVar: typeof import("@vueuse/core")["useCssVar"]
const useDark: typeof import("@vueuse/core")["useDark"]
const useDebounce: typeof import("@vueuse/core")["useDebounce"]
const useDebouncedRefHistory: typeof import("@vueuse/core")["useDebouncedRefHistory"]
const useDebounceFn: typeof import("@vueuse/core")["useDebounceFn"]
const useDeviceMotion: typeof import("@vueuse/core")["useDeviceMotion"]
const useDeviceOrientation: typeof import("@vueuse/core")["useDeviceOrientation"]
const useDevicePixelRatio: typeof import("@vueuse/core")["useDevicePixelRatio"]
const useDevicesList: typeof import("@vueuse/core")["useDevicesList"]
const useDisplayMedia: typeof import("@vueuse/core")["useDisplayMedia"]
const useDocumentVisibility: typeof import("@vueuse/core")["useDocumentVisibility"]
const useDraggable: typeof import("@vueuse/core")["useDraggable"]
const useElementBounding: typeof import("@vueuse/core")["useElementBounding"]
const useElementHover: typeof import("@vueuse/core")["useElementHover"]
const useElementSize: typeof import("@vueuse/core")["useElementSize"]
const useElementVisibility: typeof import("@vueuse/core")["useElementVisibility"]
const useEventBus: typeof import("@vueuse/core")["useEventBus"]
const useEventListener: typeof import("@vueuse/core")["useEventListener"]
const useEventSource: typeof import("@vueuse/core")["useEventSource"]
const useEyeDropper: typeof import("@vueuse/core")["useEyeDropper"]
const useFavicon: typeof import("@vueuse/core")["useFavicon"]
const useFetch: typeof import("@vueuse/core")["useFetch"]
const useFocus: typeof import("@vueuse/core")["useFocus"]
const useFps: typeof import("@vueuse/core")["useFps"]
const useFullscreen: typeof import("@vueuse/core")["useFullscreen"]
const useGeolocation: typeof import("@vueuse/core")["useGeolocation"]
const useHead: typeof import("@vueuse/head")["useHead"]
const useI18n: typeof import("vue-i18n")["useI18n"]
const useIdle: typeof import("@vueuse/core")["useIdle"]
const useIntersectionObserver: typeof import("@vueuse/core")["useIntersectionObserver"]
const useInterval: typeof import("@vueuse/core")["useInterval"]
const useIntervalFn: typeof import("@vueuse/core")["useIntervalFn"]
const useKeyModifier: typeof import("@vueuse/core")["useKeyModifier"]
const useLastChanged: typeof import("@vueuse/core")["useLastChanged"]
const useLocalStorage: typeof import("@vueuse/core")["useLocalStorage"]
const useMagicKeys: typeof import("@vueuse/core")["useMagicKeys"]
const useManualRefHistory: typeof import("@vueuse/core")["useManualRefHistory"]
const useMediaControls: typeof import("@vueuse/core")["useMediaControls"]
const useMediaQuery: typeof import("@vueuse/core")["useMediaQuery"]
const useMemory: typeof import("@vueuse/core")["useMemory"]
const useMounted: typeof import("@vueuse/core")["useMounted"]
const useMouse: typeof import("@vueuse/core")["useMouse"]
const useMouseInElement: typeof import("@vueuse/core")["useMouseInElement"]
const useMousePressed: typeof import("@vueuse/core")["useMousePressed"]
const useMutationObserver: typeof import("@vueuse/core")["useMutationObserver"]
const useNetwork: typeof import("@vueuse/core")["useNetwork"]
const useNow: typeof import("@vueuse/core")["useNow"]
const useOnline: typeof import("@vueuse/core")["useOnline"]
const usePageLeave: typeof import("@vueuse/core")["usePageLeave"]
const useParallax: typeof import("@vueuse/core")["useParallax"]
const usePermission: typeof import("@vueuse/core")["usePermission"]
const usePointer: typeof import("@vueuse/core")["usePointer"]
const usePointerSwipe: typeof import("@vueuse/core")["usePointerSwipe"]
const usePreferredColorScheme: typeof import("@vueuse/core")["usePreferredColorScheme"]
const usePreferredDark: typeof import("@vueuse/core")["usePreferredDark"]
const usePreferredLanguages: typeof import("@vueuse/core")["usePreferredLanguages"]
const useRafFn: typeof import("@vueuse/core")["useRafFn"]
const useRefHistory: typeof import("@vueuse/core")["useRefHistory"]
const useResizeObserver: typeof import("@vueuse/core")["useResizeObserver"]
const useRoute: typeof import("vue-router")["useRoute"]
const useRouter: typeof import("vue-router")["useRouter"]
const useScriptTag: typeof import("@vueuse/core")["useScriptTag"]
const useScroll: typeof import("@vueuse/core")["useScroll"]
const useScrollLock: typeof import("@vueuse/core")["useScrollLock"]
const useSessionStorage: typeof import("@vueuse/core")["useSessionStorage"]
const useShare: typeof import("@vueuse/core")["useShare"]
const useSlots: typeof import("vue")["useSlots"]
const useSpeechRecognition: typeof import("@vueuse/core")["useSpeechRecognition"]
const useSpeechSynthesis: typeof import("@vueuse/core")["useSpeechSynthesis"]
const useStorage: typeof import("@vueuse/core")["useStorage"]
const useSwipe: typeof import("@vueuse/core")["useSwipe"]
const useTemplateRefsList: typeof import("@vueuse/core")["useTemplateRefsList"]
const useThrottle: typeof import("@vueuse/core")["useThrottle"]
const useThrottledRefHistory: typeof import("@vueuse/core")["useThrottledRefHistory"]
const useThrottleFn: typeof import("@vueuse/core")["useThrottleFn"]
const useTimeAgo: typeof import("@vueuse/core")["useTimeAgo"]
const useTimeout: typeof import("@vueuse/core")["useTimeout"]
const useTimeoutFn: typeof import("@vueuse/core")["useTimeoutFn"]
const useTimestamp: typeof import("@vueuse/core")["useTimestamp"]
const useTitle: typeof import("@vueuse/core")["useTitle"]
const useToggle: typeof import("@vueuse/core")["useToggle"]
const useTransition: typeof import("@vueuse/core")["useTransition"]
const useUrlSearchParams: typeof import("@vueuse/core")["useUrlSearchParams"]
const useUserMedia: typeof import("@vueuse/core")["useUserMedia"]
const useVirtualList: typeof import("@vueuse/core")["useVirtualList"]
const useVModel: typeof import("@vueuse/core")["useVModel"]
const useVModels: typeof import("@vueuse/core")["useVModels"]
const useWakeLock: typeof import("@vueuse/core")["useWakeLock"]
const useWebSocket: typeof import("@vueuse/core")["useWebSocket"]
const useWebWorker: typeof import("@vueuse/core")["useWebWorker"]
const useWebWorkerFn: typeof import("@vueuse/core")["useWebWorkerFn"]
const useWindowFocus: typeof import("@vueuse/core")["useWindowFocus"]
const useWindowScroll: typeof import("@vueuse/core")["useWindowScroll"]
const useWindowSize: typeof import("@vueuse/core")["useWindowSize"]
const watch: typeof import("vue")["watch"]
const watchAtMost: typeof import("@vueuse/core")["watchAtMost"]
const watchEffect: typeof import("vue")["watchEffect"]
const watchOnce: typeof import("@vueuse/core")["watchOnce"]
const watchWithFilter: typeof import("@vueuse/core")["watchWithFilter"]
const whenever: typeof import("@vueuse/core")["whenever"]
}
export {}

View File

@@ -2,18 +2,18 @@
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/vue-next/pull/3399
declare module 'vue' {
declare module "vue" {
export interface GlobalComponents {
CarbonCampsite: typeof import('~icons/carbon/campsite')['default']
CarbonDicomOverlay: typeof import('~icons/carbon/dicom-overlay')['default']
CarbonLanguage: typeof import('~icons/carbon/language')['default']
CarbonLogoGithub: typeof import('~icons/carbon/logo-github')['default']
CarbonMoon: typeof import('~icons/carbon/moon')['default']
CarbonPedestrian: typeof import('~icons/carbon/pedestrian')['default']
CarbonSun: typeof import('~icons/carbon/sun')['default']
CarbonCampsite: typeof import("~icons/carbon/campsite")["default"]
CarbonDicomOverlay: typeof import("~icons/carbon/dicom-overlay")["default"]
CarbonLanguage: typeof import("~icons/carbon/language")["default"]
CarbonLogoGithub: typeof import("~icons/carbon/logo-github")["default"]
CarbonMoon: typeof import("~icons/carbon/moon")["default"]
CarbonPedestrian: typeof import("~icons/carbon/pedestrian")["default"]
CarbonSun: typeof import("~icons/carbon/sun")["default"]
CarbonWarning: typeof import("~icons/carbon/warning")["default"]
Footer: typeof import('./components/Footer.vue')['default']
README: typeof import('./components/README.md')['default']
Footer: typeof import("./components/Footer.vue")["default"]
README: typeof import("./components/README.md")["default"]
}
}

View File

@@ -1,5 +1,3 @@
@import './markdown.css';
html,
body,
#app {
@@ -29,15 +27,15 @@ html.dark {
}
.btn {
@apply px-4 py-1 rounded inline-block
bg-teal-600 text-white cursor-pointer
@apply rounded cursor-pointer bg-teal-600 text-white
py-1 px-4 inline-block
hover:bg-teal-700
disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50;
}
.icon-btn {
@apply inline-block cursor-pointer select-none
opacity-75 transition duration-200 ease-in-out
@apply cursor-pointer opacity-75 transition
ease-in-out duration-200 inline-block select-none
hover:opacity-100 hover:text-teal-600;
font-size: 0.9em;
}

View File

@@ -1,58 +0,0 @@
/* https://github.com/antfu/prism-theme-vars */
@import 'prism-theme-vars/base.css';
.prose {
--prism-font-family: 'Input Mono', monospace;
}
.prose img {
width: 100%;
}
html:not(.dark) .prose {
--prism-foreground: #393a34;
--prism-background: #fbfbfb;
--prism-comment: #a0ada0;
--prism-string: #b56959;
--prism-literal: #2f8a89;
--prism-number: #296aa3;
--prism-keyword: #1c6b48;
--prism-function: #6c7834;
--prism-boolean: #1c6b48;
--prism-constant: #a65e2b;
--prism-deleted: #a14f55;
--prism-class: #2993a3;
--prism-builtin: #ab5959;
--prism-property: #b58451;
--prism-namespace: #b05a78;
--prism-punctuation: #8e8f8b;
--prism-decorator: #bd8f8f;
--prism-regex: #ab5e3f;
--prism-json-property: #698c96;
}
html.dark .prose {
--prism-foreground: #d4cfbf;
--prism-background: #151515;
--prism-comment: #758575;
--prism-string: #d48372;
--prism-literal: #429988;
--prism-keyword: #4d9375;
--prism-boolean: #1c6b48;
--prism-number: #6394bf;
--prism-variable: #c2b36e;
--prism-function: #a1b567;
--prism-deleted: #a14f55;
--prism-class: #54b1bf;
--prism-builtin: #e0a569;
--prism-property: #dd8e6e;
--prism-namespace: #db889a;
--prism-punctuation: #858585;
--prism-decorator: #bd8f8f;
--prism-regex: #ab5e3f;
--prism-json-property: #6b8b9e;
--prism-line-number: #888888;
--prism-line-number-gutter: #eeeeee;
--prism-line-highlight-background: #444444;
--prism-selection-background: #444444;
}

View File

@@ -7,15 +7,10 @@ import Icons from "unplugin-icons/vite"
import IconsResolver from "unplugin-icons/resolver"
import Components from "unplugin-vue-components/vite"
import AutoImport from "unplugin-auto-import/vite"
import Markdown from "vite-plugin-md"
import WindiCSS from "vite-plugin-windicss"
import { VitePWA } from "vite-plugin-pwa"
import VueI18n from "@intlify/vite-plugin-vue-i18n"
import Inspect from "vite-plugin-inspect"
import Prism from "markdown-it-prism"
import LinkAttributes from "markdown-it-link-attributes"
const markdownWrapperClasses = "prose prose-sm m-auto text-left"
export default defineConfig({
resolve: {
@@ -75,29 +70,7 @@ export default defineConfig({
}),
// https://github.com/antfu/vite-plugin-windicss
WindiCSS({
safelist: markdownWrapperClasses,
}),
// https://github.com/antfu/vite-plugin-md
// Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
Markdown({
wrapperClasses: markdownWrapperClasses,
headEnabled: true,
markdownItSetup(md) {
// https://prismjs.com/
// @ts-expect-error types mismatch
md.use(Prism)
// @ts-expect-error types mismatch
md.use(LinkAttributes, {
pattern: /^https?:\/\//,
attrs: {
target: "_blank",
rel: "noopener",
},
})
},
}),
WindiCSS({}),
// https://github.com/antfu/vite-plugin-pwa
VitePWA({

View File

@@ -1,43 +1,7 @@
import { defineConfig } from "windicss/helpers"
import colors from "windicss/colors"
import typography from "windicss/plugin/typography"
export default defineConfig({
darkMode: "class",
// https://windicss.org/posts/v30.html#attributify-mode
attributify: true,
plugins: [
typography(),
],
theme: {
extend: {
typography: {
DEFAULT: {
css: {
maxWidth: "65ch",
color: "inherit",
a: {
"color": "inherit",
"opacity": 0.75,
"fontWeight": "500",
"textDecoration": "underline",
"&:hover": {
opacity: 1,
color: colors.teal[600],
},
},
b: { color: "inherit" },
strong: { color: "inherit" },
em: { color: "inherit" },
h1: { color: "inherit" },
h2: { color: "inherit" },
h3: { color: "inherit" },
h4: { color: "inherit" },
code: { color: "inherit" },
},
},
},
},
},
})

43
pnpm-lock.yaml generated
View File

@@ -288,7 +288,6 @@ importers:
'@antfu/eslint-config': ^0.11.1
'@iconify-json/carbon': ^1.0.11
'@intlify/vite-plugin-vue-i18n': ^3.2.1
'@types/markdown-it-link-attributes': ^3.0.1
'@types/nprogress': ^0.2.0
'@vitejs/plugin-vue': ^1.10.1
'@vue/compiler-sfc': ^3.2.23
@@ -301,12 +300,9 @@ importers:
eslint: ^8.3.0
eslint-plugin-cypress: ^2.12.1
https-localhost: ^4.7.0
markdown-it-link-attributes: ^3.0.0
markdown-it-prism: ^2.2.1
nprogress: ^0.2.0
pinia: ^2.0.4
pnpm: ^6.23.2
prism-theme-vars: ^0.2.2
typescript: ^4.5.2
unplugin-auto-import: ^0.4.20
unplugin-icons: ^0.12.20
@@ -329,7 +325,6 @@ importers:
'@vueuse/head': 0.7.2_vue@3.2.23
nprogress: 0.2.0
pinia: 2.0.4_typescript@4.5.2+vue@3.2.23
prism-theme-vars: 0.2.2
vue: 3.2.23
vue-demi: 0.12.1_vue@3.2.23
vue-i18n: 9.1.9_vue@3.2.23
@@ -338,7 +333,6 @@ importers:
'@antfu/eslint-config': 0.11.1_eslint@8.3.0+typescript@4.5.2
'@iconify-json/carbon': 1.0.11
'@intlify/vite-plugin-vue-i18n': 3.2.1_vite@2.6.14+vue-i18n@9.1.9
'@types/markdown-it-link-attributes': 3.0.1
'@types/nprogress': 0.2.0
'@vitejs/plugin-vue': 1.10.1_vite@2.6.14
'@vue/compiler-sfc': 3.2.23
@@ -349,8 +343,6 @@ importers:
eslint: 8.3.0
eslint-plugin-cypress: 2.12.1_eslint@8.3.0
https-localhost: 4.7.0
markdown-it-link-attributes: 3.0.0
markdown-it-prism: 2.2.1
pnpm: 6.23.2
typescript: 4.5.2
unplugin-auto-import: 0.4.20_@vueuse+core@7.1.2+vite@2.6.14
@@ -1782,7 +1774,7 @@ packages:
'@babel/helper-split-export-declaration': 7.16.0
'@babel/parser': 7.16.2
'@babel/types': 7.16.0
debug: 4.3.2
debug: 4.3.3
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -3092,7 +3084,7 @@ packages:
'@types/json-stable-stringify': 1.0.33
'@types/jsonwebtoken': 8.5.6
chalk: 4.1.2
debug: 4.3.2
debug: 4.3.3
dotenv: 10.0.0
graphql: 15.7.2
graphql-request: 3.6.1_graphql@15.7.2
@@ -4785,12 +4777,6 @@ packages:
resolution: {integrity: sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==}
dev: false
/@types/markdown-it-link-attributes/3.0.1:
resolution: {integrity: sha512-K8RnNb1q8j7rDOJbMF7AnlhCC/45BjrQ8z3WZWOrvkBIl8u9RXvmBdG/hfpnmK1JhhEZcmFEKWt+ilW1Mly+2Q==}
dependencies:
'@types/markdown-it': 12.2.3
dev: true
/@types/markdown-it/12.2.3:
resolution: {integrity: sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==}
dependencies:
@@ -5893,7 +5879,7 @@ packages:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
dependencies:
debug: 4.3.2
debug: 4.3.3
transitivePeerDependencies:
- supports-color
dev: true
@@ -11136,7 +11122,7 @@ packages:
dependencies:
'@tootallnate/once': 2.0.0
agent-base: 6.0.2
debug: 4.3.2
debug: 4.3.3
transitivePeerDependencies:
- supports-color
dev: true
@@ -11210,7 +11196,7 @@ packages:
engines: {node: '>= 6'}
dependencies:
agent-base: 6.0.2
debug: 4.3.2
debug: 4.3.3
transitivePeerDependencies:
- supports-color
dev: true
@@ -13425,17 +13411,6 @@ packages:
dependencies:
object-visit: 1.0.1
/markdown-it-link-attributes/3.0.0:
resolution: {integrity: sha512-B34ySxVeo6MuEGSPCWyIYryuXINOvngNZL87Mp7YYfKIf6DcD837+lXA8mo6EBbauKsnGz22ZH0zsbOiQRWTNg==}
dev: true
/markdown-it-prism/2.2.1:
resolution: {integrity: sha512-Lo7nQxI+x+MXQkeEXVNIer7fWCGasuEEMxYU63HJCxZNF8bfzWrXDHGsxv0a/qD3mL4sYHj0jUFT0h4fG8WQVw==}
engines: {node: '>=6.0.0'}
dependencies:
prismjs: 1.25.0
dev: true
/markdown-it/12.2.0:
resolution: {integrity: sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==}
hasBin: true
@@ -15624,14 +15599,6 @@ packages:
js-beautify: 1.14.0
dev: true
/prism-theme-vars/0.2.2:
resolution: {integrity: sha512-EL9ifuU/F8tEldoCa2sspiiLWysCL54xDbf2gN/ubwdtbuJROqOGopG5kSwunapwaioT+jLUQ/Ky+7jnv62xJA==}
dev: false
/prismjs/1.25.0:
resolution: {integrity: sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg==}
dev: true
/process-nextick-args/2.0.1:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}