是否可以在工作区生成器输出的最后输出/记录文本?
我想通知用户他/她应该执行的下一步操作,但我的日志隐藏在用户生成的所有输出之上
tree
export default async function (tree: Tree, schema: GeneratorOptions) {
await applicationGenerator(tree, {
// options go here
});
//format all the new files
await formatFiles(tree);
// log out next steps
logger.info('next steps');
logger.info('* Complete information in /src/environment files');
logger.info('* Adjust example routes in /src/app/app.tsx');
}
上面的代码产生了以下输出,正如您所看到的,我的日志完全位于顶部(没有人会看到它们)