CLI more beautiful.

This commit is contained in:
Tw93
2023-06-24 00:01:44 +08:00
parent d300ac8a16
commit baf59a3300
8 changed files with 69 additions and 64 deletions

View File

@@ -3,19 +3,19 @@ import log from 'loglevel';
const logger = {
info(...msg: any[]) {
log.info(...msg.map((m) => chalk.blue.bold(m)));
log.info(...msg.map((m) => chalk.white(m)));
},
debug(...msg: any[]) {
log.debug(...msg);
},
error(...msg: any[]) {
log.error(...msg.map((m) => chalk.red.bold(m)));
log.error(...msg.map((m) => chalk.red(m)));
},
warn(...msg: any[]) {
log.info(...msg.map((m) => chalk.yellow.bold(m)));
log.info(...msg.map((m) => chalk.yellow(m)));
},
success(...msg: any[]) {
log.info(...msg.map((m) => chalk.green.bold(m)));
log.info(...msg.map((m) => chalk.green(m)));
}
};