feat: 完善一波代码 & 支持win(待测试验证)

This commit is contained in:
volare
2022-12-04 17:53:43 +08:00
parent 93a79f482f
commit 84d749a54d
10 changed files with 164 additions and 30 deletions

22
bin/options/logger.ts vendored Normal file
View File

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