本文整理汇总了TypeScript中colors.cyan函数的典型用法代码示例。如果您正苦于以下问题:TypeScript cyan函数的具体用法?TypeScript cyan怎么用?TypeScript cyan使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cyan函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: writeFileSync
pkg.scripts.commitmsg = "commitlint -E HUSKY_GIT_PARAMS"
writeFileSync(
path.resolve(__dirname, "..", "package.json"),
JSON.stringify(pkg, null, 2)
)
// Call husky to set up the hooks
fork(path.resolve(__dirname, "..", "node_modules", "husky", "lib", "installer", 'bin'), ['install'])
console.log()
console.log(colors.green("Done!!"))
console.log()
if (pkg.repository.url.trim()) {
console.log(colors.cyan("Now run:"))
console.log(colors.cyan(" npm install -g semantic-release-cli"))
console.log(colors.cyan(" semantic-release-cli setup"))
console.log()
console.log(
colors.cyan('Important! Answer NO to "Generate travis.yml" question')
)
console.log()
console.log(
colors.gray(
'Note: Make sure "repository.url" in your package.json is correct before'
)
)
} else {
console.log(
colors.red(
示例2: log
app.use('/public', express.static(__dirname + '/../client'));
app.use('/public/vendor', express.static(__dirname + '/../../node_modules'));
// load UX and API controllers
log('initialize controllers');
let controllers: Controllers = new Controllers(app);
controllers.init();
// setup ssl self hosting
let httpServerPort: string = process.env.PORT || 3000;
// create & startup HTTP webserver
http.createServer(app)
.listen(httpServerPort);
console.log(colors.cyan('+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'));
console.log(colors.green('Starting up http server...'));
console.log(colors.green('Available on:'));
// list IPs listening on
let networks: { [index: string]: os.NetworkInterfaceInfo[] } = os.networkInterfaces();
Object.keys(networks).forEach((device: string) => {
networks[device].forEach((details: os.NetworkInterfaceInfo) => {
if (details.family === 'IPv4') {
console.log(colors.yellow(' http://' + details.address + ':' + httpServerPort));
}
});
});
console.log(colors.gray('Hit CTRL-C to stop the server'));
console.log(colors.cyan('+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'));
示例3: tsLintFile
function tsLintFile(file) {
console.log(colors.yellow('[gulp watch - tsLint]' + ' ' + colors.cyan(file)));
gulp.src(file)
.pipe($.tslint())
.pipe($.tslint.report({ emitError: false }));
}