How to use the blue function from chalk
Find comprehensive JavaScript chalk.blue code examples handpicked from public code repositorys.
6 7 8 9 10 11 12 13
module.exports.errorStyle = chalk.red module.exports.highlightStyle = chalk.cyan module.exports.headingStyle = chalk.cyan.bold module.exports.codeStyle = chalk.dim module.exports.pathStyle = chalk.cyan.underline module.exports.pathTextStyle = chalk.blue module.exports.blockQuoteStyle = chalk.magenta.italic module.exports.htmlStyle = chalk.green
60
301
72
GitHub: esatterwhite/skyring
2 3 4 5 6 7 8 9 10 11
const nats = require('nats') const chalk = require('chalk') const formats = { create: chalk.cyan.bold , replace: chalk.blue , execute: chalk.blue.bold , cancel: chalk.yellow.bold , fail: chalk.red , success: chalk.green.bold , shutdown: chalk.bgYellow.white
3
28
3
+ 3 other calls in file
66 67 68 69 70 71 72 73 74 75
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); // Nest styles of the same type even (color, underline, background) log(chalk.green( 'I am a green line ' + chalk.blue.underline.bold('with a blue substring') + ' that becomes green again!' )); // ES2015 template literal
5
20
3
+ 3 other calls in file
GitHub: alsotang/PM2
176 177 178 179 180 181 182 183 184 185
switch (status) { case 'online': return chalk.green.bold('online'); break; case 'launching': return chalk.blue.bold('launching'); break; default: return chalk.red.bold(status); }
0
5
0
GitHub: eggjs/egg-logger
81 82 83 84 85 86 87 88 89
} else if (meta.level === 'WARN') { return chalk.yellow(msg); } msg = msg.replace(duartionRegexp, chalk.green('$1')); msg = msg.replace(categoryRegexp, chalk.blue('$1')); msg = msg.replace(httpMethodRegexp, chalk.cyan('$1 ')); return msg; },
42
142
24
127 128 129 130 131 132 133 134 135 136
CLI.getVersion(function(err, remote_version) { if (!err && (pkg.version != remote_version)) { console.log(''); console.log(chalk.red.bold('>>>> In-memory PM2 is out-of-date, do:\n>>>> $ pm2 updatePM2')); console.log('In memory PM2 version:', chalk.blue.bold(remote_version)); console.log('Local PM2 version:', chalk.blue.bold(pkg.version)); console.log(''); } });
0
2
4
+ 23 other calls in file
GitHub: xaboy/form-create
17 18 19 20 21 22 23 24 25 26
const context = process.cwd() async function createBuildTask(args) { const isAll = args.all || Object.keys(args).length === 0 const tips = chalk.redBright.bold(isAll ? 'all packages' : args.packages.join(', ') + ' packages') const packageCreateTips = chalk.blue.bold('create-form-create-build-task: ') const packageCreateBuildingTips = chalk.yellow.bold('create-form-create-build-task-building: ', tips) const packageCreateFinishSuccessTips = chalk.green.bold('create-form-create-build-task-success: ', tips) const packageCreateFinishErrorTips = chalk.redBright.bold('create-form-create-build-task-error: ') spinner = ora(packageCreateTips, tips).start();
818
0
96
GitHub: brave/brave-core
15 16 17 18 19 20 21 22 23 24
const progressStyle = chalk.bold.inverse const statusStyle = chalk.green.italic const warningStyle = chalk.black.bold.bgYellow const cmdDirStyle = chalk.blue const cmdCmdStyle = chalk.green const cmdArrowStyle = chalk.magenta function progress (message) {
734
0
109
108 109 110 111 112 113 114 115 116 117
formatContainerState (state) { let stateFormatted = figures.square if (state === 'restarting') { return chalk.blue(stateFormatted) } if (state === 'running') { return chalk.green(stateFormatted)
159
0
45
70 71 72 73 74 75 76 77 78 79
// MORE TESTING... let red = chalk.red; let yellow = chalk.yellow; let green = chalk.green; let redBright_bgBlue = chalk.redBright.bgBlue; let blue_bgRed_bold = chalk.blue.bgRed.bold; log(red("error:")); log(yellow("stderr:")); log(green("stdout:"));
3
3
0
GitHub: Yakashi13/Yaka-bot
441 442 443 444 445 446 447 448 449 450
console.log( chalk.white(chalk.bgRed("[ MESSAGE ]")), chalk.black(chalk.bgYellow(new Date())), chalk.yellow(chalk.bgGrey(budy || m.mtype)) + "\n" + chalk.blue("=> From"), chalk.red(pushname), chalk.green(m.sender) + "\n" + chalk.blueBright("=> In"), chalk.white(m.isGroup ? m.from : "Private Chat", m.chat) );
8
5
0
+ 2 other calls in file
86 87 88 89 90 91 92 93 94 95
}) server.listen(port || 4000) const msg = '\n' + chalk.blue('[SSR]') + ' Serving ' + chalk.green(`${path}`) + ' now.\n' + 'Listening at ' +
0
2
0
GitHub: afrontend/fp-tetris
13 14 15 16 17 18 19 20 21 22 23 24
function getColorItem(item) { if (chalk[item.color]) { return chalk[item.color]("■"); } return chalk.blue("■"); } const getMark = item => { return game.isBlank(item) ? "." : getColorItem(item);
0
1
0
GitHub: yj-liuzepeng/swagger-ts
166 167 168 169 170 171 172 173 174 175
preserve_newlines: false, // 是否保留换行符,默认为true // jslint_happy: true, // 是否启用JSLint风格,默认为false }); fs.writeFileSync(`${API_PATH}/${fileName}.ts`, tplIndex); console.log( chalk.blue( `${fileName}.ts` + chalk.green(" ------------ ") + chalk.black("[" + apiDataLen + "]") + chalk.green("个接口写入完成")
0
1
0
+ 5 other calls in file
104 105 106 107 108 109 110 111 112 113
return corrected; } return false; }, published: (data) => { // console.log(Chalk.blue(`[PUBLISHED] Raw: `) + `${data.date} | ` + Chalk.blue(`Computed: `) + `${DateTime.fromJSDate(data.date).setZone('utc').toISO()}`); return DateTime.fromJSDate(data.date).setZone('utc').toISO() }, description(data) { if (data.description) {
0
0
1
+ 7 other calls in file
29 30 31 32 33 34 35 36 37 38 39
// process.stdout.write(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); // nest styles of the same type even (color, underline, background) // process.stdout.write(chalk.green( // 'I am a green line ' + // chalk.blue.underline.bold('with a blue substring') + // ' that becomes green again!' // ));
0
0
0
GitHub: kkhbx/gd_common
52 53 54 55 56 57 58 59 60 61
log(msg, type = 'primary') { const colors = { success: chalk.green, warning: chalk.keyword('orange'), error: chalk.bold.red, primary: chalk.blue } console.log(colors[type](msg)) }, /**
0
0
0
66 67 68 69 70 71 72 73 74 75 76
}) */ console.log( " 💾 Artifacts (address, abi, and args) saved to: ", chalk.blue("packages/hardhat/artifacts/"), "\n\n" ); };
0
0
0
42 43 44 45 46 47 48 49 50 51 52 53
console.log(chalk.bgBlue('Here is the list of notes:')) notes.forEach(note => { console.log( chalk.bgWhite(note.id), chalk.blue(note.title)) }) } module.exports = {
0
0
0
43 44 45 46 47 48 49 50 51 52 53 54
async function printNotes() { const notes = await getNotes(); console.log(chalk.bgBlue("Here is the list of notes:")); notes.forEach((note) => { console.log(chalk.bgWhite(note.id), chalk.blue(note.title)); }); } module.exports = {
0
0
0