chalk
终端打印信息彩色字体,提高辨识度
安装
npm install chalk -S
使用
const chalk = require('chalk')
console.log(chalk.blue('Hello world!'))
定义自己的主题
const chalk = require('chalk')
let log = {
error(str) {
chalk.bold.red(str)
}
// your own themes
}
终端打印信息彩色字体,提高辨识度
npm install chalk -S
const chalk = require('chalk')
console.log(chalk.blue('Hello world!'))
const chalk = require('chalk')
let log = {
error(str) {
chalk.bold.red(str)
}
// your own themes
}