Skip to content

Commit

Permalink
chore: migrate to nanocolors (#3865)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 authored Sep 24, 2021
1 parent d20def5 commit 01b178d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 16 deletions.
8 changes: 4 additions & 4 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ class Server {
}

logStatus() {
const colorette = require("colorette");
const nanocolors = require("nanocolors");

const getColorsOption = (compilerOptions) => {
let colorsEnabled;
Expand All @@ -1683,7 +1683,7 @@ class Server {
) {
colorsEnabled = compilerOptions.stats;
} else {
colorsEnabled = colorette.options.enabled;
colorsEnabled = nanocolors.isColorSupported;
}

return colorsEnabled;
Expand All @@ -1692,14 +1692,14 @@ class Server {
const colors = {
info(useColor, msg) {
if (useColor) {
return colorette.cyan(msg);
return nanocolors.cyan(msg);
}

return msg;
},
error(useColor, msg) {
if (useColor) {
return colorette.red(msg);
return nanocolors.red(msg);
}

return msg;
Expand Down
87 changes: 76 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"ansi-html-community": "^0.0.8",
"bonjour": "^3.5.0",
"chokidar": "^3.5.1",
"colorette": "^1.2.2",
"compression": "^1.7.4",
"connect-history-api-fallback": "^1.6.0",
"del": "^6.0.0",
Expand All @@ -45,6 +44,7 @@
"http-proxy-middleware": "^2.0.0",
"internal-ip": "^6.2.0",
"ipaddr.js": "^2.0.1",
"nanocolors": "^0.1.12",
"open": "^8.0.9",
"p-retry": "^4.5.0",
"portfinder": "^1.0.28",
Expand Down

0 comments on commit 01b178d

Please sign in to comment.