我正在尝试使用 nx-devkit 用新的 nx 生成器替换旧的 angular-devkit 原理图。
我在这里遵循指南:https ://nx.dev/generators/composing-generators
我们应该能够等待 nx 生成器,但是当我这样做时,生成器不会在等待完成之前完成。
预期的:
this should happen before
...application is created
this should happen after
实际的:
this should happen before
this should happen after
...application is created
export default async function(tree: Tree, schema: SchemaOptions) {
logger.info('this should happen before');
await applicationGenerator(tree, {...}); // this returns before the files are created
logger.info('this should happen after');
}