I'm trying to replace an old angular-devkit schematic with a new nx generator using nx-devkit.
I'm following the guide here: https://nx.dev/generators/composing-generators
We should be able to await the nx generators, however when I do, the generator does not complete before await finishes.
Expected:
this should happen before
...application is created
this should happen after
Actual:
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');
}
Isn't that simple as just puting await before calling applicationGenerator?