const printOutput = function(t, normalizedReturn) { console.log(` ${magentaBright.bold(`${LINE} ${t.title} ${LINE}`)} ${normalizedReturn}`) t.pass() }
prompt .run() .then((answers) => { if (answers.length === 0) { return; } data.set('favs', [...favs, ...answers]); return console.log( `${chalk.greenBright('Success')}: ${answers .map((answer) => chalk.blue.bold(answer)) .join(', ')} added to favourites.\n` ); }) .catch(console.error);
sh.exec(command, (code, stderr, stdout) => { if (code !== 0 && stderr) { console.log(chalk.red.bold('Error occurred while packaging Parking Lot\n')); return 0; } else { console.log(chalk.green.bold('Success! Documentation is created inside out/ folder\n')); console.log(chalk.bgMagenta.bold('Go to out/ folder and open global.html\n')); } });
const success = (title, description) => message(`${chalk.green.bold(title)}\n\n${description}`)
const gRPCCallLogger = call => { console.log( chalk.green("Request received from agent => "), chalk.white.bold(call.metadata._internal_repr["user-agent"][0]) ); console.log(chalk.green("Params => "), JSON.stringify(call.request, null, 4)); }
warn(msg, signal=' ∅') { console.log('...' + chalk.yellowBright(`${chalk.yellowBright.bold(signal)} ${msg}`)); }
log(msg, signal=' ○') { console.log('...' + `${chalk.greenBright.bold(signal)} ${chalk.white(msg)}`); }
const printOutput = function(t, normalizedReturn) { console.log(` ${magentaBright.bold(`${LINE} ${t.title} ${LINE}`)} ${normalizedReturn}`) t.pass() }