Export styles from ansi-styles (#567)
This commit is contained in:
parent
92c55db46f
commit
6e0df055f4
6 changed files with 219 additions and 115 deletions
|
|
@ -204,14 +204,22 @@ Object.defineProperties(createChalk.prototype, styles);
|
|||
const chalk = createChalk();
|
||||
export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
||||
|
||||
export {
|
||||
modifierNames,
|
||||
foregroundColorNames,
|
||||
backgroundColorNames,
|
||||
colorNames,
|
||||
|
||||
// TODO: Remove these aliases in the next major version
|
||||
modifierNames as modifiers,
|
||||
foregroundColorNames as foregroundColors,
|
||||
backgroundColorNames as backgroundColors,
|
||||
colorNames as colors,
|
||||
} from './vendor/ansi-styles/index.js';
|
||||
|
||||
export {
|
||||
stdoutColor as supportsColor,
|
||||
stderrColor as supportsColorStderr,
|
||||
};
|
||||
|
||||
export const modifiers = Object.keys(ansiStyles.modifier);
|
||||
export const foregroundColors = Object.keys(ansiStyles.color);
|
||||
export const backgroundColors = Object.keys(ansiStyles.bgColor);
|
||||
export const colors = [...foregroundColors, ...backgroundColors];
|
||||
|
||||
export default chalk;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue