简体   繁体   中英

How to run nx dep-graph on specific projects only

I am working on a system that is using a mono-repo structure. We are using Nx as a tool to manage the workspace. This workspace consists of several feature-projects that get loaded into a single portal application.

When using Nx, I would like to run a dep-graph analysis on only a single project to show its dependant libraries without showing unrelated projects.

Is this possible with the current nx cli?

I tried running nx dep-graph my-project-name but this still showed the output of the entire workspace

At the moment this functionality is not available for nx dep-graph . This functionality can also be useful for me, that's why I'm waiting for it. Maybe if more people report interest here https://github.com/nrwl/nx/issues/1864 someone will do it :)

Thanks for reporting this problem


UPDATE


Now you can generate deph graph for single project. You can simply add include parameter:

nx dep-graph --include=project-one

If you want to see the dependencies of several projects:

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

You can also exclude projects you don't want to see:

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

More about dep-graph you can read here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM