Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose styles as variables #566

Merged
merged 6 commits into from Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/index.d.ts
Expand Up @@ -284,4 +284,8 @@ export {
// } from '#supports-color';
} from './vendor/supports-color/index.js';

export const modifiers: Modifiers[];
LitoMore marked this conversation as resolved.
Show resolved Hide resolved
export const foregroundColors: ForegroundColor[];
export const backgroundColors: BackgroundColor[];

export default chalk;
4 changes: 4 additions & 0 deletions source/index.js
Expand Up @@ -209,4 +209,8 @@ export {
stderrColor as supportsColorStderr,
};

export const modifiers = Object.keys(ansiStyles.modifier);
export const foregroundColors = Object.keys(ansiStyles.color);
export const backgroundColors = Object.keys(ansiStyles.bgColor);
LitoMore marked this conversation as resolved.
Show resolved Hide resolved
LitoMore marked this conversation as resolved.
Show resolved Hide resolved

export default chalk;