From 360c9e167fa30fce04f055493f75665fe70b280b Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 2 Nov 2021 10:08:16 +0800 Subject: [PATCH] feat: switch to unocss --- README.md | 8 ++-- components.d.ts | 4 -- package.json | 6 ++- pnpm-lock.yaml | 95 +++++++++++++++++++++++++++++++++++++++ src/App.vue | 2 +- src/components/Footer.vue | 19 +++++--- src/main.ts | 6 +-- src/pages/hi/[name].vue | 6 +-- src/pages/index.vue | 8 ++-- src/styles/main.css | 3 +- vite.config.ts | 20 +++++++-- 11 files changed, 142 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 23bfd34..a4f10a0 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ - πŸ“¦ [Components auto importing](./src/components) -- 🎨 [Windi CSS](https://github.com/windicss/windicss) - next generation utility-first CSS framework +- 🎨 [UnoCSS](https://github.com/antfu/unocss) - The instant on-demand atomic CSS engine. -- πŸ˜ƒ [Use icons from any icon sets, with no compromise](./src/components) +- πŸ˜ƒ Use icons from any icon sets in [Pure CSS](https://github.com/antfu/unocss/tree/main/packages/preset-icons) - πŸ”₯ Use the [new ` diff --git a/src/main.ts b/src/main.ts index e24fa9e..7f9289e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,11 +4,9 @@ import { createRouter, createWebHistory } from 'vue-router' import routes from 'virtual:generated-pages' import App from './App.vue' -// windicss layers -import 'virtual:windi-base.css' -import 'virtual:windi-components.css' +import '@unocss/reset/tailwind.css' import './styles/main.css' -import 'virtual:windi-utilities.css' +import 'uno.css' const app = createApp(App) const router = createRouter({ diff --git a/src/pages/hi/[name].vue b/src/pages/hi/[name].vue index 79ccd2a..d8e4fcd 100644 --- a/src/pages/hi/[name].vue +++ b/src/pages/hi/[name].vue @@ -5,13 +5,11 @@ const router = useRouter()