Skip to content

Commit 89387df

Browse files
juresapegin
authored andcommitted
Fix: Fix kleur is not a function error (styleguidist#1285)
Closes styleguidist#1284
1 parent 1ac32f4 commit 89387df

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/bin/styleguidist.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ process.on('uncaughtException', err => {
2727
consts.DOCS_CONFIG
2828
);
2929
} else if (err instanceof StyleguidistError) {
30-
console.error(
31-
kleur()
32-
.bold()
33-
.red(err.message)
34-
);
30+
console.error(kleur.bold().red(err.message));
3531
logger.debug(err.stack);
3632
} else {
3733
console.error(err.toString());
@@ -223,11 +219,7 @@ function printBuildInstructions(config) {
223219
* @param {string} linkUrl
224220
*/
225221
function printErrorWithLink(message, linkTitle, linkUrl) {
226-
console.error(
227-
`${kleur()
228-
.bold()
229-
.red(message)}\n\n${linkTitle}\n${kleur.underline(linkUrl)}\n`
230-
);
222+
console.error(`${kleur.bold().red(message)}\n\n${linkTitle}\n${kleur.underline(linkUrl)}\n`);
231223
}
232224

233225
/**

0 commit comments

Comments
 (0)