mirror of
https://github.com/astefanutti/decktape.git
synced 2024-09-11 22:27:11 +03:00
fix: replace undefined chalk.keyword method
This commit is contained in:
parent
b9182e6526
commit
2b715577dd
@ -207,7 +207,7 @@ if (os.name === 'windows') parser.nocolors();
|
|||||||
const color = type => {
|
const color = type => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'error': return chalk.red;
|
case 'error': return chalk.red;
|
||||||
case 'warning': return chalk.keyword('orange');
|
case 'warning': return chalk.yellow;
|
||||||
default: return chalk.gray;
|
default: return chalk.gray;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -259,7 +259,7 @@ process.on('unhandledRejection', error => {
|
|||||||
.on('requestfailed', request => {
|
.on('requestfailed', request => {
|
||||||
// do not output warning for cancelled requests
|
// do not output warning for cancelled requests
|
||||||
if (request.failure() && request.failure().errorText === 'net::ERR_ABORTED') return;
|
if (request.failure() && request.failure().errorText === 'net::ERR_ABORTED') return;
|
||||||
console.log(chalkTemplate`\n{keyword('orange') Unable to load resource from URL: ${request.url()}}`);
|
console.log(chalkTemplate`\n{yellow Unable to load resource from URL: ${request.url()}}`);
|
||||||
})
|
})
|
||||||
.on('pageerror', error => console.log(chalkTemplate`\n{red Page error: ${error.message}}`));
|
.on('pageerror', error => console.log(chalkTemplate`\n{red Page error: ${error.message}}`));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user