feat: 支持 UNM rust

This commit is contained in:
qier222 2022-05-01 19:53:25 +08:00
parent 4d59401549
commit 4d54060a4f
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
29 changed files with 717 additions and 231 deletions

View file

@ -2,7 +2,7 @@
const { colord } = require('colord')
const colors = require('tailwindcss/colors')
const replaceBrandColorWithCssVar = () => {
const replaceBrandColorWithCSSVar = () => {
const blues = Object.entries(colors.blue).map(([key, value]) => {
const c = colord(value).toRgb()
return {
@ -11,7 +11,7 @@ const replaceBrandColorWithCssVar = () => {
}
})
return {
postcssPlugin: 'replaceBrandColorWithCssVar',
postcssPlugin: 'replaceBrandColorWithCSSVar',
Declaration(decl) {
let value = decl.value
blues.forEach(blue => {
@ -33,12 +33,12 @@ const replaceBrandColorWithCssVar = () => {
},
}
}
replaceBrandColorWithCssVar.postcss = true
replaceBrandColorWithCSSVar.postcss = true
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
replaceBrandColorWithCssVar,
replaceBrandColorWithCSSVar,
],
}