Graph 从Bazel依赖关系图中排除@npm//依赖关系(Bazel查询)
我使用以下命令为我的Bazel项目生成图形Graph 从Bazel依赖关系图中排除@npm//依赖关系(Bazel查询),graph,bazel,Graph,Bazel,我使用以下命令为我的Bazel项目生成图形 bazel query 'deps(//services/gateway:lib)' --output graph --nohost_deps --noimplicit_deps > graph.in dot -Tpng < graph.in > graph.png 正如您所看到的,这个图表非常庞大,因为@npm/ 我真正想要的是这样的东西: digraph mygraph { node [shape=box]; &quo
bazel query 'deps(//services/gateway:lib)' --output graph --nohost_deps --noimplicit_deps > graph.in
dot -Tpng < graph.in > graph.png
正如您所看到的,这个图表非常庞大,因为@npm/
我真正想要的是这样的东西:
digraph mygraph {
node [shape=box];
"//services/gateway:lib"
"//services/gateway:lib" -> "//services/gateway:controllers/auth.controller.ts\n//services/gateway:index.ts\n//services/gateway:controllers/index.controller.ts\n//:tsconfig.json\n//services/gateway:controllers/index.ts"
"//services/gateway:lib" -> "@npm//@types/node:node"
"//services/gateway:lib" -> "@npm//inversify-express-utils:inversify-express-utils"
"//services/gateway:lib" -> "@npm//helmet:helmet"
"//services/gateway:lib" -> "@npm//inversify:inversify"
}
是否可以删除图形中的所有npm依赖项,而无需手动从图形文件中删除它们?当您描述您感兴趣的目标时(例如,使用
deps()
),您应该能够更多或更少地:
或:
当您描述您感兴趣的目标时(例如使用
deps()
),您应该能够更多或更少地:
或:
digraph mygraph {
node [shape=box];
"//services/gateway:lib"
"//services/gateway:lib" -> "//services/gateway:controllers/auth.controller.ts\n//services/gateway:index.ts\n//services/gateway:controllers/index.controller.ts\n//:tsconfig.json\n//services/gateway:controllers/index.ts"
"//services/gateway:lib" -> "@npm//@types/node:node"
"//services/gateway:lib" -> "@npm//inversify-express-utils:inversify-express-utils"
"//services/gateway:lib" -> "@npm//helmet:helmet"
"//services/gateway:lib" -> "@npm//inversify:inversify"
}
deps(//services/gateway:lib) except @npm//...:*
deps(//services/gateway:lib) - @npm//...:*