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 <adam.wathan@gmail.com>
This commit is contained in:
parent
7859cee257
commit
f332bee41b
1 changed files with 6 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue