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.

49 lines
1.4 KiB

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