本文整理汇总了TypeScript中chalk.black.bgRedBright方法的典型用法代码示例。如果您正苦于以下问题:TypeScript black.bgRedBright方法的具体用法?TypeScript black.bgRedBright怎么用?TypeScript black.bgRedBright使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chalk.black
的用法示例。
在下文中一共展示了black.bgRedBright方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
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');