1
0

APIDump: Added an "apishow" command.

Launches the webbrowser to show the locally exported API docs.
This commit is contained in:
Mattes D 2015-05-02 12:26:19 +02:00
parent aa142757db
commit 81274b6ee9

View File

@ -1643,6 +1643,15 @@ end
local function HandleCmdApiShow(a_Split, a_EntireCmd)
os.execute("API" .. cFile:GetPathSeparator() .. "index.html")
return true, "Launching the browser to show the API docs..."
end
function Initialize(Plugin)
g_Plugin = Plugin;
g_PluginFolder = Plugin:GetLocalFolder();
@ -1651,6 +1660,7 @@ function Initialize(Plugin)
-- Bind a console command to dump the API:
cPluginManager:BindConsoleCommand("api", HandleCmdApi, "Dumps the Lua API docs into the API/ subfolder")
cPluginManager:BindConsoleCommand("apishow", HandleCmdApiShow, "Runs the default browser to show the API docs")
-- Add a WebAdmin tab that has a Dump button
g_Plugin:AddWebTab("APIDump", HandleWebAdminDump)