本文整理汇总了TypeScript中chalk.blue类的典型用法代码示例。如果您正苦于以下问题:TypeScript blue类的具体用法?TypeScript blue怎么用?TypeScript blue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了blue类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
program.on('--help', () => {
console.log(
`
Supported Apps:
ImageAlpha: ${chalk.blue.underline('https://pngmini.com')}
ImageOptim: ${chalk.blue.underline('https://imageoptim.com')}
JPEGmini Lite: ${chalk.blue.underline(
'https://itunes.apple.com/us/app/jpegmini-lite/id525742250'
)}
JPEGmini Pro: ${chalk.blue.underline(
'https://itunes.apple.com/us/app/jpegmini-pro/id887163276'
)}
JPEGmini: ${chalk.blue.underline('https://itunes.apple.com/us/app/jpegmini/id498944723')}
Examples:
${chalk.dim('Run ImageOptim.app over every image in current directory')}
imageoptim
${chalk.dim('Run ImageAlpha.app and ImageOptim.app over every PNG in current directory')}
imageoptim --imagealpha '**/*.png'
${chalk.dim('Run JPEGmini.app and ImageOptim.app over every JPG in current directory')}
imageoptim --jpegmini '**/*.jpg' '**/*.jpeg'
${chalk.dim('Run JPEGmini.app over every JPG in current directory')}
imageoptim --jpegmini --no-imageoptim '**/*.jpg' '**/*.jpeg'
${chalk.dim('Run ImageOptim.app over every image in a specific directory')}
imageoptim '~/Desktop'
`.trimRight()
);
});
示例2: logCodeSandbox
export function logCodeSandbox() {
console.log(
` ${chalk.blue.bold('Code')}${chalk.yellow.bold('Sandbox')} ${chalk.bold(
'CLI',
)}`,
);
console.log(' The official CLI for uploading projects to CodeSandbox');
}
示例3: debugLog
this._mockTransport.server.on("data", (data: Buffer) => {
let reply = this._replies[this._counter];
this._counter++;
if (reply) {
if (_.isFunction(reply)) {
reply = reply.call(this);
// console.log(" interpreting reply as a function" + reply);
if (!reply) {
return;
}
}
debugLog("\nFAKE SERVER RECEIVED");
debugLog(hexDump(data));
let replies = [];
if (reply instanceof Buffer) {
replies.push(reply);
} else {
replies = reply;
}
assert(replies.length >= 1, " expecting at least one reply " + JSON.stringify(reply));
replies.forEach((reply1: any) => {
debugLog("\nFAKE SERVER SEND");
debugLog(chalk.red(hexDump(reply1)));
this._mockTransport.server.write(reply1);
});
} else {
const msg = " MockServerTransport has no more packets to send to client to" +
" emulate server responses.... ";
console.log(chalk.red.bold(msg));
console.log(chalk.blue.bold(hexDump(data)));
display_trace_from_this_projet_only();
analyseExtensionObject(data, 0, 0, {});
this.emit("done");
}
});
示例4: info
public info(message: string): void { // それ以外
this.log(chalk.blue.bold('INFO'), message);
}
示例5: succ
public succ(message: string): void { // 何かに成功した状況で使う
this.log(chalk.blue.bold('INFO'), chalk.green.bold(message));
}
示例6: logQuery
public logQuery(text: string, values?: any[]): void {
console.log(' ', chalk.blue.bold(text), values);
}