summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/xpack_component.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-22 00:48:56 +0800
committerruki <[email protected]>2023-11-22 00:48:56 +0800
commit8c8f130f69343bbb50dafa718a8fe6df63497974 (patch)
tree0c5831419ce91e09f934ec1390a31c59091f2305 /xmake/plugins/pack/xpack_component.lua
parent574d9bca0e5d7a01fdf2500ac83c75f5927bb69d (diff)
add title
Diffstat (limited to 'xmake/plugins/pack/xpack_component.lua')
-rw-r--r--xmake/plugins/pack/xpack_component.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/plugins/pack/xpack_component.lua b/xmake/plugins/pack/xpack_component.lua
index 62e8a1efe..bb274d08a 100644
--- a/xmake/plugins/pack/xpack_component.lua
+++ b/xmake/plugins/pack/xpack_component.lua
@@ -60,6 +60,11 @@ function xpack_component:extraconf(name, item, key)
end
end
+-- get the component title
+function xpack_component:title()
+ return self:get("title") or self:name()
+end
+
-- get the component description
function xpack_component:description()
return self:get("description")