Signed-off-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
Richie Bendall 2021-04-17 18:03:12 +12:00
parent 5dbc9d54d6
commit 427ea57355
No known key found for this signature in database
GPG key ID: 1C6A99DFA9D306FC
2 changed files with 67 additions and 81 deletions

View file

@ -29,7 +29,7 @@ const applyOptions = (object, options = {}) => {
object.level = options.level === undefined ? colorLevel : options.level;
};
class Chalk {
export class Chalk {
constructor(options) {
// eslint-disable-next-line no-constructor-return
return chalkFactory(options);
@ -212,13 +212,11 @@ const chalkTag = (chalk, ...strings) => {
Object.defineProperties(createChalk.prototype, styles);
const chalk = createChalk();
const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
chalkStderr.supportsColor = stderrColor;
export {
stdoutColor as supportsColor,
chalkStderr,
Chalk
stdoutColor as supportsColor
};
export default chalk;