From 908a2fbb3a27d2796a79ccd5576ca4c3a2d372ea Mon Sep 17 00:00:00 2001
From: JinMao <jinmao88@qq.com>
Date: 星期二, 15 十一月 2022 19:43:20 +0800
Subject: [PATCH] chore: update ci

---
 windi.config.ts |   43 ++++++++++++++++++-------------------------
 1 files changed, 18 insertions(+), 25 deletions(-)

diff --git a/tailwind.config.js b/windi.config.ts
similarity index 71%
rename from tailwind.config.js
rename to windi.config.ts
index 1a1c9a9..0f3d1f2 100644
--- a/tailwind.config.js
+++ b/windi.config.ts
@@ -1,41 +1,34 @@
-const colors = require('tailwindcss/colors');
+import { defineConfig } from 'vite-plugin-windicss';
+import { primaryColor } from './build/config/themeConfig';
 
-module.exports = {
-  mode: 'jit',
-  // darkMode: 'class',
+export default defineConfig({
+  darkMode: 'class',
   plugins: [createEnterPlugin()],
-  purge: {
-    enabled: false,
-    content: ['./index.html', './src/**/*.{vue,ts,tsx}'],
-  },
   theme: {
     extend: {
       zIndex: {
         '-1': '-1',
       },
-    },
-    colors: {
-      ...colors,
-      primary: {
-        DEFAULT: '#0960bd',
-        // dark: primaryColorDark,
+      colors: {
+        primary: primaryColor,
+      },
+      screens: {
+        sm: '576px',
+        md: '768px',
+        lg: '992px',
+        xl: '1200px',
+        '2xl': '1600px',
       },
     },
-    screens: {
-      sm: '576px',
-      md: '768px',
-      lg: '992px',
-      xl: '1200px',
-      '2xl': '1600px',
-    },
   },
-};
+});
+
 /**
- * Used for animation when the element is displayed
- * @param maxOutput The larger the maxOutput output, the larger the generated css volume
+ * Used for animation when the element is displayed.
+ * @param maxOutput The larger the maxOutput output, the larger the generated css volume.
  */
 function createEnterPlugin(maxOutput = 6) {
-  const createCss = (index, d = 'x') => {
+  const createCss = (index: number, d = 'x') => {
     const upd = d.toUpperCase();
     return {
       [`*> .enter-${d}:nth-child(${index})`]: {

--
Gitblit v1.8.0