From d56b1a406ee741763cafbf9dbb008e4f271f4a12 Mon Sep 17 00:00:00 2001 From: pskfyi Date: Thu, 6 Jan 2022 22:29:10 -0800 Subject: [PATCH] chore: always publish colors . --- tailwind.config.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index 0e430af..38dab9c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,21 @@ 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 = { - purge: [], + purge: { + safelist, + }, darkMode: false, // or 'media' or 'class' theme: { extend: {