Mar*_*nJH 5 angular angular-schematics
我正在试验 Angular 原理图,并在不同的地方遇到了函数 branchAndMerge()。然而,没有人解释它的作用。
我见过的地方:
澄清它与合并/合并的区别,以及如何正确使用它,将不胜感激。
PS:合并在@angular-devkit/schematics解释如下:
将输入树与其他树合并。
顺便说一句,我假设merge() 现在是mergeWith,尽管我不是100% 确定。
代码示例
const rule =
// Creates a new rule that is a concatenation of other rules.
chain([
// Everyone uses it, but no one explains what it does...
branchAndMerge(
chain([
// Merges the project tree with the virtual tree
mergeWith(virtualTree)
]))
]);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1082 次 |
| 最近记录: |