summaryrefslogtreecommitdiff
path: root/xmake/plugins/show/main.lua
diff options
context:
space:
mode:
authorAkaps316 <[email protected]>2026-04-11 11:43:14 +0530
committerruki <[email protected]>2026-04-20 09:35:36 +0800
commit8512dce671af24d2f293728bfdb9e65f81e5ed38 (patch)
tree2028395b1f6f1127ed15ad94ad0ecfafe4ffbed7 /xmake/plugins/show/main.lua
parent3a1b4e1719ba50b259afa27b450f06c39548003d (diff)
feat(show): export target dependency graph as JSON
Add a graph-oriented mode to `xmake show` for exporting target\ndependency relationships as JSON.\n\nThis adds `--target_graph` support for whole-project output and\noptional root-target filtering with `--target`.\n\nAdd a plugin test covering full-graph and single-target graph export.\n\nRefs #7475
Diffstat (limited to 'xmake/plugins/show/main.lua')
-rw-r--r--xmake/plugins/show/main.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/plugins/show/main.lua b/xmake/plugins/show/main.lua
index 9dc4f519a..2b337b13e 100644
--- a/xmake/plugins/show/main.lua
+++ b/xmake/plugins/show/main.lua
@@ -32,6 +32,8 @@ function main()
local listname = option.get("list")
if listname then
return _show_list(listname)
+ elseif option.get("target_graph") then
+ return assert(import("info.target_graph", {try = true, anonymous = true}))(option.get("target"))
else
-- show the information of the given object
for _, filepath in ipairs(os.files(path.join(os.scriptdir(), "info", "*.lua"))) do