You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 KiB

  1. import {
  2. transformerVariantGroup,
  3. transformerDirectives,
  4. presetAttributify,
  5. defineConfig,
  6. presetMini,
  7. presetUno
  8. } from "unocss";
  9. // https://github.com/unocss/unocss#readme
  10. export default defineConfig({
  11. presets: [presetMini({ dark: "class" }), presetAttributify(), presetUno()],
  12. transformers: [transformerDirectives(), transformerVariantGroup()],
  13. // unocss默认不扫描 node_modules、dist、css以及其扩展 具体实现:https://github.com/unocss/unocss/blob/03c8abe8f5020b3baaed3dfbfe8e2258dd041a7e/packages/vite/src/utils.ts#L3
  14. exclude: [
  15. "node_modules",
  16. "dist",
  17. ".git",
  18. ".github",
  19. ".husky",
  20. ".vscode",
  21. "build",
  22. "locales",
  23. "mock",
  24. "public",
  25. "types",
  26. ".eslintrc.js",
  27. ".prettierrc.js",
  28. "postcss.config.js",
  29. "stylelint.config.js",
  30. "commitlint.config.js",
  31. "README.md",
  32. "CHANGELOG.md",
  33. "README.en-US.md",
  34. "CHANGELOG.en_US.md",
  35. "CHANGELOG.zh_CN.md"
  36. ],
  37. shortcuts: {
  38. "bg-dark": "bg-bg_color",
  39. "wh-full": "w-full h-full",
  40. "flex-wrap": "flex flex-wrap",
  41. "flex-c": "flex justify-center items-center",
  42. "flex-ac": "flex justify-around items-center",
  43. "flex-bc": "flex justify-between items-center",
  44. "navbar-bg-hover": "dark:color-white !dark:hover:bg-[#242424]"
  45. },
  46. theme: {
  47. colors: {
  48. bg_color: "var(--el-bg-color)",
  49. primary: "var(--el-color-primary)",
  50. primary_light_9: "var(--el-color-primary-light-9)",
  51. text_color_primary: "var(--el-text-color-primary)",
  52. text_color_regular: "var(--el-text-color-regular)",
  53. text_color_disabled: "var(--el-text-color-disabled)"
  54. }
  55. }
  56. });