From 2709858ce6632056a311df9971a7de6c5c93c863 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 10 Apr 2024 19:24:54 +0800 Subject: [PATCH] chore: move uno config --- playground/uno.config.ts | 8 -------- playground/vite.config.ts | 2 +- talk/uno.config.ts | 25 +------------------------ uno.config.ts | 24 ++++++++++++++++++++++++ 4 files changed, 26 insertions(+), 33 deletions(-) delete mode 100644 playground/uno.config.ts create mode 100644 uno.config.ts diff --git a/playground/uno.config.ts b/playground/uno.config.ts deleted file mode 100644 index 6d8d68d..0000000 --- a/playground/uno.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineConfig } from 'unocss' -import { presetUseful } from 'unocss-preset-useful' - -export default defineConfig({ - presets: [ - presetUseful(), - ], -}) diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 7a15f60..49a05a5 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -16,7 +16,7 @@ export default defineConfig({ }, plugins: [ vue(), - UnoCSS(), + UnoCSS('../unocss.config.ts') as any, AutoImport({ imports: [ 'vue', diff --git a/talk/uno.config.ts b/talk/uno.config.ts index 9f3279c..1509f26 100644 --- a/talk/uno.config.ts +++ b/talk/uno.config.ts @@ -1,24 +1 @@ -import type { Preset } from 'unocss' -import { defineConfig } from 'unocss' -import type { UsefulTheme } from 'unocss-preset-useful' -import { presetUseful } from 'unocss-preset-useful' - -export default defineConfig({ - shortcuts: { - 'grad-color': 'text-$vp-c-brand', - 'linear-text': 'text-transparent bg-clip-text bg-gradient-to-r', - 'grad-p-r': 'linear-text from-purple to-red', - }, - presets: [ - presetUseful({ - webFonts: { - provider: 'google', - fonts: { - sans: 'Roboto', - mono: ['Fira Code', 'Fira Mono:400,700'], - }, - }, - }) as Preset, - ], - separators: ['_', '-', ':'], -}) +export { default } from '../uno.config' diff --git a/uno.config.ts b/uno.config.ts new file mode 100644 index 0000000..9f3279c --- /dev/null +++ b/uno.config.ts @@ -0,0 +1,24 @@ +import type { Preset } from 'unocss' +import { defineConfig } from 'unocss' +import type { UsefulTheme } from 'unocss-preset-useful' +import { presetUseful } from 'unocss-preset-useful' + +export default defineConfig({ + shortcuts: { + 'grad-color': 'text-$vp-c-brand', + 'linear-text': 'text-transparent bg-clip-text bg-gradient-to-r', + 'grad-p-r': 'linear-text from-purple to-red', + }, + presets: [ + presetUseful({ + webFonts: { + provider: 'google', + fonts: { + sans: 'Roboto', + mono: ['Fira Code', 'Fira Mono:400,700'], + }, + }, + }) as Preset, + ], + separators: ['_', '-', ':'], +})