mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
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,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…
x
Reference in New Issue
Block a user