mirror of https://github.com/Hilbis/Hilbish
refactor: remove global module from doc command (closes #90)
parent
2a0cd1464a
commit
62d8725d99
|
@ -50,8 +50,6 @@ end)
|
||||||
|
|
||||||
commander.register('doc', function(args)
|
commander.register('doc', function(args)
|
||||||
local moddocPath = hilbish.dataDir .. '/docs/'
|
local moddocPath = hilbish.dataDir .. '/docs/'
|
||||||
local globalDesc = [[
|
|
||||||
These are the global Hilbish functions that are always available and not part of a module.]]
|
|
||||||
local modDocFormat = [[
|
local modDocFormat = [[
|
||||||
%s
|
%s
|
||||||
%s
|
%s
|
||||||
|
@ -101,11 +99,10 @@ These are the global Hilbish functions that are always available and not part of
|
||||||
end
|
end
|
||||||
end))
|
end))
|
||||||
|
|
||||||
if mod == 'global' or ok then
|
if ok then
|
||||||
local props = {}
|
local props = {}
|
||||||
local propstr = ''
|
local propstr = ''
|
||||||
local modDesc = globalDesc
|
local modDesc = ''
|
||||||
if ok then
|
|
||||||
local modmt = getmetatable(require(mod))
|
local modmt = getmetatable(require(mod))
|
||||||
modDesc = modmt.__doc
|
modDesc = modmt.__doc
|
||||||
if modmt.__docProp then
|
if modmt.__docProp then
|
||||||
|
@ -114,7 +111,6 @@ These are the global Hilbish functions that are always available and not part of
|
||||||
return lunacolors.underline(lunacolors.blue(k)) .. ' > ' .. v
|
return lunacolors.underline(lunacolors.blue(k)) .. ' > ' .. v
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
if #props > 0 then
|
if #props > 0 then
|
||||||
propstr = '\n# Properties\n' .. table.concat(props, '\n') .. '\n'
|
propstr = '\n# Properties\n' .. table.concat(props, '\n') .. '\n'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue