本文整理汇总了TypeScript中ansi-colors.yellow函数的典型用法代码示例。如果您正苦于以下问题:TypeScript yellow函数的具体用法?TypeScript yellow怎么用?TypeScript yellow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yellow函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: log
export = (done: any) => {
log(colors.yellow(`
Warning!
Please use ${colors.green('npm run build.prod')}
Instead of ${colors.red('npm run build.prod.aot')} or ${colors.red('npm run build.prod.aot')}
They will be deleted soon!`));
done();
};
开发者ID:albogdano,项目名称:angular2-para,代码行数:9,代码来源:deprecate.notification.ts
示例2: existsSync
.forEach((key: string) => {
if (key === 'lang') {
const lang: string = namedArgs[key] as string;
const i18nFilePath = `${Config.LOCALE_DEST}/messages.${lang}.xlf`;
const isExists = existsSync(i18nFilePath);
if (isExists) {
args.push('--i18nFile', i18nFilePath);
args.push('--locale', lang);
args.push('--i18nFormat', 'xlf');
} else {
log(colors.gray('Translation file is not found'), colors.yellow(i18nFilePath));
log(colors.gray(`Use 'npm run i18n' command to create your translation file`));
}
} else {
args.push('--' + key, namedArgs[key]);
}
});
开发者ID:albogdano,项目名称:angular2-para,代码行数:17,代码来源:compile.ahead.prod.ts
示例3: registerTask
/**
* Registers the task by the given taskname and path.
* @param {string} taskname - The name of the task.
* @param {string} path - The path of the task.
*/
function registerTask(taskname: string, path: string): void {
const TASK = join(path, taskname);
log('Registering task', colors.yellow(tildify(TASK)));
gulp.task(taskname, (done: any) => {
const task = normalizeTask(require(TASK), TASK);
if (changeFileManager.pristine || task.shallRun(changeFileManager.lastChangedFiles)) {
const result = task.run(done, changeFileManager.lastChangedFiles);
if (result && typeof result.catch === 'function') {
result.catch((e: any) => {
log(`Error while running "${TASK}"`, e);
});
}
return result;
} else {
done();
}
});
}
开发者ID:albogdano,项目名称:angular2-para,代码行数:25,代码来源:tasks_tools.ts
示例4:
import * as colors from 'ansi-colors';
let s: string;
s = colors.bgblack("hello");
s = colors.bgblue("hello");
s = colors.bgcyan("hello");
s = colors.bggreen("hello");
s = colors.bgmagenta("hello");
s = colors.bgred("hello");
s = colors.bgwhite("hello");
s = colors.bgyellow("hello");
s = colors.black("hello");
s = colors.blue("hello");
s = colors.bold("hello");
s = colors.cyan("hello");
s = colors.dim("hello");
s = colors.gray("hello");
s = colors.green("hello");
s = colors.grey("hello");
s = colors.hidden("hello");
s = colors.inverse("hello");
s = colors.italic("hello");
s = colors.magenta("hello");
s = colors.red("hello");
s = colors.reset("hello");
s = colors.strikethrough("hello");
s = colors.underline("hello");
s = colors.white("hello");
s = colors.yellow("hello");
开发者ID:AlexGalays,项目名称:DefinitelyTyped,代码行数:30,代码来源:ansi-colors-tests.ts
示例5: loadTasks
export function loadTasks(path: string): void {
log('Loading tasks folder', colors.yellow(path));
readDir(path, taskname => registerTask(taskname, path));
}
开发者ID:albogdano,项目名称:angular2-para,代码行数:4,代码来源:tasks_tools.ts
注:本文中的ansi-colors.yellow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论