fix: use CSS color instead
This commit is contained in:
+12
-5
@@ -1,3 +1,4 @@
|
|||||||
|
import { feature } from "bun:bundle";
|
||||||
import { color, inspect } from "bun";
|
import { color, inspect } from "bun";
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
@@ -7,17 +8,23 @@ const colors = [
|
|||||||
"blue",
|
"blue",
|
||||||
"magenta",
|
"magenta",
|
||||||
"cyan",
|
"cyan",
|
||||||
"brightRed",
|
"lime",
|
||||||
"brightGreen",
|
|
||||||
"brightBlue",
|
|
||||||
"brightMagenta",
|
|
||||||
"orange",
|
"orange",
|
||||||
|
"violet",
|
||||||
|
"skyblue",
|
||||||
"pink",
|
"pink",
|
||||||
"turquoise",
|
|
||||||
"gold",
|
"gold",
|
||||||
|
"deepskyblue",
|
||||||
|
"springgreen",
|
||||||
];
|
];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
|
|
||||||
|
if (!feature("API"))
|
||||||
|
console.log(
|
||||||
|
colors.map((c) => `${color(c, "ansi")}${c.slice(0, 1)}`).join("") +
|
||||||
|
color("lightgray", "ansi"),
|
||||||
|
);
|
||||||
|
|
||||||
export function createLogger() {
|
export function createLogger() {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
const col = color(colors[i], "ansi");
|
const col = color(colors[i], "ansi");
|
||||||
|
|||||||
Reference in New Issue
Block a user