本文整理汇总了TypeScript中chalk.bold.cyan方法的典型用法代码示例。如果您正苦于以下问题:TypeScript bold.cyan方法的具体用法?TypeScript bold.cyan怎么用?TypeScript bold.cyan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chalk.bold
的用法示例。
在下文中一共展示了bold.cyan方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
export const numF = (val: string | number) => chalk.bold.cyan(val.toString());
示例2: run
//.........这里部分代码省略.........
this.cmd = await foundCommand.run(this.config)
if (foundCommand.deprecated) {
this.cmd.out.log(
chalk.yellow(
`\nThis command is deprecated and will be removed in 1.9`,
),
)
}
this.setRavenUserContext()
const checker = getStatusChecker()!
checker.checkStatus(
foundCommand.command ? id : id.split(':')[0],
this.cmd.args,
this.cmd.flags,
this.cmd.argv,
)
if (process.env.NOCK_WRITE_RESPONSE_CLI === 'true') {
const requests = require('nock').recorder.play()
const requestsPath = path.join(process.cwd(), 'requests.js')
debug('WRITING', requestsPath)
fs.writeFileSync(requestsPath, requests.join('\n'))
}
} else {
const topic = await dispatcher.findTopic(id)
if (topic) {
await this.Help.run(this.config)
const checker = getStatusChecker()!
checker.checkStatus(id, {}, {}, [])
} else if (id === 'logs') {
throw new CommandReplacedError('logs', 'cluster logs')
} else if (id === 'push') {
throw new CommandReplacedError('push', 'deploy')
} else if (id === 'seed') {
throw new CommandReplacedError('seed', 'import')
} else if (
[
'cluster',
'cluster:info',
'cluster:add',
'cluster:remove',
'cluster:logs',
'cluster:info',
].includes(id)
) {
throw new CommandRemovedError(
'1.7',
'https://bit.ly/release-notes-1-7',
'',
)
} else if (
[
'local',
'local:up',
'local:down',
'local:start',
'local:stop',
'local:upgrade',
'local:nuke',
'local:ps',
].includes(id)
) {
throw new CommandRemovedError(
'1.7',
'https://bit.ly/release-notes-1-7',
'You can use docker-compose directly to manage the state of a local server.',
)
} else {
return new NotFound(out, this.config.argv).run()
}
}
}
if (this.notifier.update) {
this.notifier.notify({
message:
'Update available ' +
chalk.dim(this.notifier.update.current) +
chalk.reset(' â ') +
chalk.cyan(this.notifier.update.latest) +
`\nRun ${chalk.bold.cyan('npm i -g prisma')} to update`,
boxenOpts: {
padding: 1,
margin: 1,
align: 'center',
borderColor: 'grey',
borderStyle: 'round',
},
})
}
if (!this.config.argv.includes('playground')) {
const { timeout } = require('./util')
await timeout(this.flush(), 1000)
out.exit(0)
} else {
debug('not flushing')
}
}
示例3: label
export function label(text: string): string {
return Chalk.bold.cyan(`${text}:`);
}