Merge b597d19435 into dbae68d623
This commit is contained in:
commit
5bd4b0d12f
1 changed files with 9 additions and 0 deletions
|
|
@ -76,6 +76,15 @@ CPU: ${chalk.red('90%')}
|
|||
RAM: ${chalk.green('40%')}
|
||||
DISK: ${chalk.yellow('70%')}
|
||||
`);
|
||||
|
||||
// ES2015 using [tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals)
|
||||
const { red, yellow, green } = chalk;
|
||||
log(`
|
||||
CPU: ${red.bold`90%`}
|
||||
RAM: ${green`40%`}
|
||||
DISK: ${yellow`70%`}
|
||||
`);
|
||||
|
||||
```
|
||||
|
||||
Easily define your own themes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue