2017-07-03 00:27:16 +02:00
|
|
|
import chalk from '..';
|
2017-07-02 14:32:45 +02:00
|
|
|
|
|
|
|
|
chalk.underline('foo');
|
|
|
|
|
chalk.red('foo');
|
|
|
|
|
chalk.bgRed('foo');
|
|
|
|
|
|
2017-07-02 14:52:52 +02:00
|
|
|
const name = 'Josh';
|
|
|
|
|
chalk`Hello {bold.red ${name}}`;
|
|
|
|
|
|
2017-07-02 14:32:45 +02:00
|
|
|
chalk.red`foo`;
|
|
|
|
|
chalk.underline`foo`;
|
|
|
|
|
chalk`foo`;
|
|
|
|
|
|
|
|
|
|
chalk.red.bgGreen.underline('foo');
|
|
|
|
|
chalk.underline.red.bgGreen('foo');
|
|
|
|
|
|
|
|
|
|
chalk.grey('foo');
|
|
|
|
|
|
2017-07-02 17:26:14 +02:00
|
|
|
chalk.constructor({level: 1});
|
2017-07-03 00:05:36 +02:00
|
|
|
const ctx = chalk.constructor({level: chalk.Level.TrueColor });
|
2017-07-02 14:32:45 +02:00
|
|
|
ctx('foo');
|
|
|
|
|
ctx.red('foo');
|
|
|
|
|
ctx`foo`;
|
|
|
|
|
|
2017-07-03 00:27:16 +02:00
|
|
|
chalk.enabled = true;
|
|
|
|
|
chalk.level = 1;
|
|
|
|
|
chalk.level = chalk.Level.Extended;
|
|
|
|
|
|
2017-07-03 00:05:36 +02:00
|
|
|
chalk.level === chalk.Level.Extended;
|
2017-07-02 17:26:14 +02:00
|
|
|
|
2017-07-02 14:32:45 +02:00
|
|
|
chalk.enabled;
|
|
|
|
|
chalk.supportsColor;
|
|
|
|
|
chalk.level;
|
|
|
|
|
|
|
|
|
|
chalk.keyword('orange').bgBlue('foo');
|
|
|
|
|
chalk.hex('#123456').bgBlue('foo');
|
|
|
|
|
chalk.rgb(1, 14, 9).bgBlue('foo');
|
|
|
|
|
chalk.hsl(1, 14, 9).bgBlue('foo');
|
|
|
|
|
chalk.hsv(1, 14, 9).bgBlue('foo');
|
|
|
|
|
chalk.hwb(1, 14, 9).bgBlue('foo');
|