chore: always publish colors

.
This commit is contained in:
pskfyi 2022-01-06 22:29:10 -08:00 committed by pskfyi
parent 4d11db3a33
commit d56b1a406e
1 changed files with 15 additions and 1 deletions

View File

@ -1,7 +1,21 @@
const colors = require('tailwindcss/colors') const colors = require('tailwindcss/colors')
const { black, white, ...rainbow } = colors
const COLOR_TYPE = ['bg', 'text', 'border']
const COLOR_NAME = Object.keys(rainbow)
const COLOR_NUMBER = Object.keys(rainbow.rose) // any color will do
const safelist = COLOR_TYPE.flatMap((type) =>
COLOR_NAME.flatMap((name) =>
COLOR_NUMBER.map((number) => `${type}-${name}-${number}`)
)
)
module.exports = { module.exports = {
purge: [], purge: {
safelist,
},
darkMode: false, // or 'media' or 'class' darkMode: false, // or 'media' or 'class'
theme: { theme: {
extend: { extend: {