-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.ts
More file actions
41 lines (35 loc) · 1.54 KB
/
Copy pathexample.ts
File metadata and controls
41 lines (35 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { logger, Logger, LogLevel } from './packages/print/src/index.ts';
import { colors as prtty } from './packages/prtty/src/index.ts';
import chalk from 'chalk';
import kleur from 'kleur';
import colors from 'colors';
import picocolors from 'picocolors';
import ansicolors from 'ansi-colors';
import * as colorette from 'colorette';
import yoctocolors from 'yoctocolors';
import { styleText } from 'node:util';
const newLogger = new Logger({
label: 'example',
logLevel: LogLevel.Info
})
const test = (c: any) => c.red(`${c.bold(`${c.cyan(`${c.yellow("yellow")}cyan`)}`)}red`);
const testNode = () => styleText("red", `${styleText(["bold", "cyan"], `${styleText("yellow", "yellow")}cyan`)}red`);
newLogger.info(prtty.cyan(`Hello, ${prtty.bold().bgBlue().white('World!')}`));
newLogger.info('prtty\t', test(prtty));
newLogger.info('chalk\t', test(chalk));
newLogger.info('kleur\t', test(kleur));
newLogger.info('colors\t', test(colors));
newLogger.info('picocolors\t', test(picocolors));
newLogger.info('ansicolors\t', test(ansicolors));
newLogger.info('colorette\t', test(colorette));
newLogger.info('yoctocolors\t', test(yoctocolors));
newLogger.info('node:util\t', testNode());
logger.info('prtty\t', test(prtty));
logger.info('chalk\t', test(chalk));
logger.info('kleur\t', test(kleur));
logger.info('colors\t', test(colors));
logger.info('picocolors\t', test(picocolors));
logger.info('ansicolors\t', test(ansicolors));
logger.info('colorette\t', test(colorette));
logger.info('yoctocolors\t', test(yoctocolors));
logger.info('node:util\t', testNode());