Skip to content

Commit b49f330

Browse files
committed
Replace colorette with nanocolors
1 parent 889f18c commit b49f330

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

lib/autoprefixer.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
let browserslist = require('browserslist')
2-
let colorette = require('colorette')
2+
let nanocolors = require('nanocolors')
33
let postcss = require('postcss')
44
let agents = require('caniuse-lite').agents
55

@@ -79,15 +79,11 @@ module.exports = postcss.plugin('autoprefixer', (...reqs) => {
7979
reqs = options.overrideBrowserslist
8080
} else if (options.browsers) {
8181
if (typeof console !== 'undefined' && console.warn) {
82-
if (colorette.red) {
83-
console.warn(
84-
colorette.red(
85-
WARNING.replace(/`[^`]+`/g, i => colorette.yellow(i.slice(1, -1)))
86-
)
82+
console.warn(
83+
nanocolors.red(
84+
WARNING.replace(/`[^`]+`/g, i => nanocolors.yellow(i.slice(1, -1)))
8785
)
88-
} else {
89-
console.warn(WARNING)
90-
}
86+
)
9187
}
9288
reqs = options.browsers
9389
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@babel/register": "^7.10.5",
2626
"browserslist": "^4.12.0",
2727
"caniuse-lite": "^1.0.30001109",
28-
"colorette": "^1.2.1",
28+
"nanocolors": "^0.2.8",
2929
"normalize-range": "^0.1.2",
3030
"num2fraction": "^1.2.2",
3131
"postcss": "^7.0.32",

test/webpack.test.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6908,6 +6908,11 @@ nan@^2.12.1:
69086908
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
69096909
integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
69106910

6911+
nanocolors@^0.2.8:
6912+
version "0.2.8"
6913+
resolved "https://registry.yarnpkg.com/nanocolors/-/nanocolors-0.2.8.tgz#ea9190bb9a6834df3a53b2cf2dc52f5de76b84fd"
6914+
integrity sha512-lFtwopLYUwJ/w+VcBib+Ti1J+USzc/m2XN9LCCl/AhibkzYlXk6FHeqkJqBWRd70RpjArGWYZQjwa6UgwYycBA==
6915+
69116916
nanoid@^3.1.10:
69126917
version "3.1.10"
69136918
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.10.tgz#69a8a52b77892de0d11cede96bc9762852145bc4"

0 commit comments

Comments
 (0)