【问题标题】:How to run nx dep-graph on specific projects only如何仅在特定项目上运行 nx dep-graph
【发布时间】:2020-01-15 05:54:34
【问题描述】:

我正在开发一个使用单一回购结构的系统。我们使用 Nx 作为管理工作空间的工具。此工作区由多个功能项目组成,这些功能项目被加载到单个门户应用程序中。

使用 Nx 时,我想只对单个项目运行深度图分析,以显示其依赖库而不显示不相关的项目。

当前的 nx cli 可以做到这一点吗?

我尝试运行 nx dep-graph my-project-name 但这仍然显示整个工作区的输出

【问题讨论】:

    标签: angular nrwl nrwl-nx


    【解决方案1】:

    目前nx dep-graph 无法使用此功能。这个功能对我也很有用,这就是我等待它的原因。也许如果更多人在这里报告感兴趣https://github.com/nrwl/nx/issues/1864 有人会这样做:)

    感谢您报告此问题


    更新


    现在您可以为单个项目生成深度图。您可以简单地添加include 参数:

    nx dep-graph --include=project-one

    如果要查看几个项目的依赖关系:

    nx dep-graph --include=project-one,project-two

    您也可以排除不想看到的项目:

    nx dep-graph --include=project-one,project-two --exclude=project-three

    More about dep-graph you can read here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-24
      • 1970-01-01
      • 2020-02-27
      • 2011-12-25
      • 1970-01-01
      • 1970-01-01
      • 2017-03-11
      相关资源
      最近更新 更多