当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript chalk.black类代码示例

本文整理汇总了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));
	}
开发者ID:duffman,项目名称:superbob,代码行数:3,代码来源:terminal.ts

示例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');
开发者ID:OddenCreative,项目名称:versionpress,代码行数:30,代码来源:init-dev.ts


注:本文中的chalk.black类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。