npm.io
2.0.3 • Published 1 year ago

sz-theme-manager

Licence
MIT
Version
2.0.3
Deps
2
Size
141 kB
Vulns
0
Weekly
0

通用样式管理工具

安装

npm i @zxsz/theme-manager
或者
pnpm add @zxsz/theme-manager

基础样式集规则配置

请确保项目正确安装了tailwindcss相关依赖

创建tailwindcss配置文件

npx tailwindcss init -p 

在配置文件中引入样式集预设

// tailwind.config.js

const SZ_THEME = require('@zxsz/theme-manager');

module.exports = {
  presets: [SZ_THEME],
  //...其他配置
}

创建实例

import ThemeManager from '@zxsz/theme-manager/lib';
// 挂载到style标签中
themeManager.mount();