summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-09-22 22:37:56 +0800
committerruki <[email protected]>2017-09-22 09:47:39 +0800
commit672d5ae9a9fef8a0dc5de4ed0643e8594e1cb85c (patch)
tree4007b54189cfbb4ac366cca21735793e68aa69e7 /xmake/core/package/package.lua
parentfe319cb58be817295c0ad610cfe411be0eff57e0 (diff)
add require alias
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 52a3eba13..8a0b1b83b 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -99,6 +99,14 @@ function _instance:name()
return self._NAME
end
+-- get the package alias
+function _instance:alias()
+ local requireinfo = self:requireinfo()
+ if requireinfo then
+ return requireinfo.alias
+ end
+end
+
-- get the package vendor
function _instance:vendor()
return self._VENDOR