本文整理汇总了TypeScript中chalk.black类的典型用法代码示例。如果您正苦于以下问题:TypeScript black类的具体用法?TypeScript black怎么用?TypeScript black使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了black类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: echoSetting
public echoSetting(setting: string, value: string): void {
console.log(chalk.black.bgWhite(setting + " " + value));
}
示例2:
import * as shell from 'shelljs';
import * as utils from "./script-utils";
import * as build from "./build";
import * as isWindows from "is-windows";
import chalk from 'chalk';
utils.exitIfNotRunFromRootDir();
//------------------------------------
utils.printTaskHeading('Checking your local environment');
if (isWindows()) {
const scriptShell = shell.exec('npm config get script-shell', { silent: true }).stdout.toString().trim();
if (!scriptShell.endsWith('bash.exe')) {
console.log('');
console.log(chalk.black.bgRedBright(`Warning!`) + chalk.redBright(` On Windows, we strongly recommend Git Bash as an npm script-shell.`));
console.log('');
console.log(chalk.whiteBright(`We detected your current script-shell is: ${scriptShell === 'null' ? 'cmd.exe' : scriptShell}`));
console.log(chalk.whiteBright(`You can set a script-shell by running:`));
console.log('');
console.log(chalk.whiteBright(` npm config set script-shell "c:\\Program Files\\git\\bin\\bash.exe"`));
}
}
//------------------------------------
utils.printTaskHeading('Configuring git');
shell.exec('git config core.ignorecase false && git config core.filemode false');
//------------------------------------
utils.printTaskHeading('Installing dependencies in ext-libs');
shell.exec('composer install -d ext-libs --ignore-platform-reqs');