项目作者: riuandg5

项目描述 :
Node package combining figlet and chalk.
高级语言: JavaScript
项目地址: git://github.com/riuandg5/figchalk.git
创建时间: 2018-06-28T08:22:09Z
项目社区:https://github.com/riuandg5/figchalk

开源协议:

下载


figchalk

figlet + chalk

Installation

  1. npm install figchalk -g

Usage

  1. // require the module
  2. const figchalk = require('figchalk');
  3. // modify string with both figlet and chalk
  4. // syntax figchalk.mix(string, characterColor, fontStyle, horizontalSpacing, verticalSpacing)
  5. console.log(figchalk.mix("figchalk", "blueBright", "Graffiti"));
  6. // modify string with figlet only
  7. // syntax figchalk.figlet(string, fontStyle, horizontalSpacing, verticalSpacing)
  8. console.log(figchalk.figlet("figlet", "3d diagonal"));
  9. // modify with chalk only
  10. // syntax figchalk.chalk(string, characterColor, backgroundColor)
  11. console.log(figchalk.chalk("chalk", "yellowBright"));
  12. // set theme for particular chalk statements
  13. // syntax figchalk.theme(characterColor, backgroundColor)
  14. const theme = figchalk.theme("green", "bgWhiteBright");
  15. // return chalk statement with theme
  16. // syntax themeName(anyString)
  17. console.log(theme("this statement has a theme"));

CLI

  1. syntax : figchalk [-f or -c] [-s] <string> [--cc] <chalkColor> [--cb] <chalkBackground> [--ff] <figletFont> [--hl] <horizontalSpacing> [--vl] <verticalSpacing>
  2. --version Show version number
  3. -f, --figlet Figlet string
  4. -c, --chalk Chalk coloured string
  5. -s, --string String to be converted [required]
  6. --cc, --chalkcolor String color
  7. --cb, --chalkbg String background color
  8. --ff, --figletfont String font
  9. --hl, --horlay Horizontal spacing
  10. --vl, --verlay Verticalal spacing
  11. -h, --help Show help
  12. Examples:
  13. figchalk -f -s string // output figlet string with standard font
  14. figchalk -f -s string --ff Ghost // output figlet string with Ghost font
  15. figchalk -c -s string // output default colored string
  16. figchalk -c -s string --cc cyanBright // output cyanBright colored string
  17. figchalk -s string // output figlet string with default color and standard font
  18. figchalk -s string --cc greenBright --ff // output figlet string with
  19. Small // greenBright color and Doom font