zoukankan      html  css  js  c++  java
  • npm的chalk包的使用

      使用chalk定义输出样式:Chalk comes with an easy to use composable API where you just chain and nest the styles you want.

    const chalk = require('chalk')
    
    console.log(chalk.blue('Hello world!'))
    
    
    console.log(chalk.hex('#DEADED').underline('Hello, world!'))
    console.log(chalk.keyword('orange')('Some orange text'))
    console.log(chalk.rgb(15, 100, 204).inverse('Hello!'))
    
    console.log(`==========================`)
    const error = chalk.bold.red;
    const warning = chalk.keyword('orange');
    
    console.log(error('Error!'));
    console.log(warning('Warning!'));

    ---

  • 相关阅读:
    二月12日
    十日冲刺
    十日冲刺
    十日冲刺
    十日冲刺
    十日冲刺
    十日冲刺
    十日冲刺
    一周进度条博客
    十天冲刺
  • 原文地址:https://www.cnblogs.com/xy-ouyang/p/12210608.html
Copyright © 2011-2022 走看看