本文整理汇总了TypeScript中@angular-devkit/core.strings.decamelize方法的典型用法代码示例。如果您正苦于以下问题:TypeScript strings.decamelize方法的具体用法?TypeScript strings.decamelize怎么用?TypeScript strings.decamelize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular-devkit/core.strings
的用法示例。
在下文中一共展示了strings.decamelize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: update
compiler.hooks.compilation.tap('ArchitectPlugin', compilation => {
const hooks = hookSafelist;
if (reset) {
reset = false;
modulesCount = modulesDone = hooksDone = numberOfHooks = 0;
}
// Need to add hooks for each compilation.
numberOfHooks += hooks.length;
// Pre-emptively tell the user.
context.reportRunning();
update('Preparing...');
compilation.hooks.buildModule.tap('ArchitectPlugin', buildModule);
compilation.hooks.failedModule.tap('ArchitectPlugin', failedModule);
compilation.hooks.succeedModule.tap('ArchitectPlugin', succeedModule);
for (const name of hooks) {
// Transforms `camelCase` into `Camel case`. decamelize() transforms it into `camel_case`
// and then we replace the `_` with spaces.
const title = strings.capitalize(strings.decamelize(name).replace(/_/g, ' '));
compilation.hooks[name].intercept({
call: () => {
hooksDone++;
update(title);
},
});
}
});