npm i beauty-console-log
// import by object
import beautyLog from 'beauty-console-log';
beautyLog.red('test text color!')
beautyLog.bgRed('test background color!')
beautyLog.info(logData)
beautyLog.success(logData)
beautyLog.warning(logData)
beautyLog.error(logData)
// import by function
import { red, bgRed, success } from 'beauty-console-log';
red('test text color!')
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- gray
- bgBlack
- bgRed
- bgGreen
- bgYellow
- bgBlue
- bgMagenta
- bgCyan
- bgGray
- bold
- info
- success
- warning
- error
参考链接