代码之家  ›  专栏  ›  技术社区  ›  sjbuysse

在自定义Nx工作区生成器的最末端输出文本

  •  0
  • sjbuysse  · 技术社区  · 4 年前

    是否可以在工作区生成器输出的最后输出/记录文本? 我想通知用户他/她应该执行的下一步操作,但我的日志隐藏在用户生成的所有输出之上 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');
    }
    

    上面的代码产生了以下输出,正如您所看到的,我的日志完全位于顶部(没有人会看到它们)

    output workspace generator

    0 回复  |  直到 4 年前
    推荐文章