From f332bee41b65eb5d4ab8116a29f2bd70eab1fc20 Mon Sep 17 00:00:00 2001 From: Michael <9247037+nifte@users.noreply.github.com> Date: Fri, 10 Sep 2021 11:41:19 -0700 Subject: [PATCH] Update color warnings to match other warnings (#5412) * Update color warnings to match other warnings Make the color deprecation warnings match the style of other warnings in tailwind * Fix formatting * Use log helper Co-authored-by: Adam Wathan --- colors.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/colors.js b/colors.js index f8797e774..e609e3817 100644 --- a/colors.js +++ b/colors.js @@ -1,9 +1,13 @@ +const log = require('./lib/util/log').default + let warned = [] function warn({ version, from, to }) { if (!warned.includes(from)) { - console.log(`warn - As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`) - console.log('warn - Please update your color palette to eliminate this warning.') + log.warn([ + `As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`, + 'Please update your color palette to eliminate this warning.', + ]) warned.push(from) } }