Minor tweaks
This commit is contained in:
parent
625a285772
commit
95217429be
3 changed files with 29 additions and 24 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": "./source/index.js",
|
"exports": "./source/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.17"
|
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "xo && nyc ava && tsd",
|
"test": "xo && nyc ava && tsd",
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
"console",
|
"console",
|
||||||
"cli",
|
"cli",
|
||||||
"string",
|
"string",
|
||||||
"str",
|
|
||||||
"ansi",
|
"ansi",
|
||||||
"style",
|
"style",
|
||||||
"styles",
|
"styles",
|
||||||
|
|
|
||||||
29
readme.md
29
readme.md
|
|
@ -52,9 +52,13 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://uibakery.io/?utm_source=chalk&utm_medium=sponsor&utm_campaign=github">
|
<a href="https://strapi.io/?ref=sindresorhus">
|
||||||
<div>
|
<div>
|
||||||
<img src="https://sindresorhus.com/assets/thanks/uibakery-logo.jpg" width="270" alt="UI Bakery">
|
<img src="https://sindresorhus.com/assets/thanks/strapi-logo-white-bg.png" width="220" alt="Strapi">
|
||||||
|
</div>
|
||||||
|
<b>Strapi is the leading open-source headless CMS.</b>
|
||||||
|
<div>
|
||||||
|
<sup>It’s 100% JavaScript, fully customizable, and developer-first.</sup>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -78,8 +82,8 @@
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```console
|
```sh
|
||||||
$ npm install chalk
|
npm install chalk
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
@ -204,15 +208,16 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
|
||||||
|
|
||||||
### Modifiers
|
### Modifiers
|
||||||
|
|
||||||
- `reset` - Resets the current color chain.
|
- `reset` - Reset the current style.
|
||||||
- `bold` - Make text bold.
|
- `bold` - Make the text bold.
|
||||||
- `dim` - Emitting only a small amount of light.
|
- `dim` - Make the text have lower opacity.
|
||||||
- `italic` - Make text italic. *(Not widely supported)*
|
- `italic` - Make the text italic. *(Not widely supported)*
|
||||||
- `underline` - Make text underline. *(Not widely supported)*
|
- `underline` - Put a horizontal line below the text. *(Not widely supported)*
|
||||||
- `inverse`- Inverse background and foreground colors.
|
- `overline` - Put a horizontal line above the text. *(Not widely supported)*
|
||||||
- `hidden` - Prints the text, but makes it invisible.
|
- `inverse`- Invert background and foreground colors.
|
||||||
|
- `hidden` - Print the text but make it invisible.
|
||||||
- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
|
- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
|
||||||
- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
|
- `visible`- Print the text only when Chalk has a color level above zero. Can be useful for things that are purely cosmetic.
|
||||||
|
|
||||||
### Colors
|
### Colors
|
||||||
|
|
||||||
|
|
|
||||||
21
source/index.d.ts
vendored
21
source/index.d.ts
vendored
|
|
@ -213,52 +213,53 @@ export interface ChalkInstance extends ChalkFunction {
|
||||||
bgAnsi256: (index: number) => this;
|
bgAnsi256: (index: number) => this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Resets the current color chain.
|
Modifier: Reset the current style.
|
||||||
*/
|
*/
|
||||||
readonly reset: this;
|
readonly reset: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Make text bold.
|
Modifier: Make the text bold.
|
||||||
*/
|
*/
|
||||||
readonly bold: this;
|
readonly bold: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Make text slightly darker. (Inconsistent across terminals; might do nothing)
|
Modifier: Make the text have lower opacity.
|
||||||
*/
|
*/
|
||||||
readonly dim: this;
|
readonly dim: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Make text italic. (Not widely supported)
|
Modifier: Make the text italic. *(Not widely supported)*
|
||||||
*/
|
*/
|
||||||
readonly italic: this;
|
readonly italic: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Make text underline. (Not widely supported)
|
Modifier: Put a horizontal line below the text. *(Not widely supported)*
|
||||||
*/
|
*/
|
||||||
readonly underline: this;
|
readonly underline: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Make text overline. (Not widely supported)
|
Modifier: Put a horizontal line above the text. *(Not widely supported)*
|
||||||
*/
|
*/
|
||||||
readonly overline: this;
|
readonly overline: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Inverse background and foreground colors.
|
Modifier: Invert background and foreground colors.
|
||||||
*/
|
*/
|
||||||
readonly inverse: this;
|
readonly inverse: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Prints the text, but makes it invisible.
|
Modifier: Print the text but make it invisible.
|
||||||
*/
|
*/
|
||||||
readonly hidden: this;
|
readonly hidden: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
|
Modifier: Puts a horizontal line through the center of the text. *(Not widely supported)*
|
||||||
*/
|
*/
|
||||||
readonly strikethrough: this;
|
readonly strikethrough: this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Modifier: Prints the text only when Chalk has a color support level > 0.
|
Modifier: Print the text only when Chalk has a color level above zero.
|
||||||
|
|
||||||
Can be useful for things that are purely cosmetic.
|
Can be useful for things that are purely cosmetic.
|
||||||
*/
|
*/
|
||||||
readonly visible: this;
|
readonly visible: this;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue