APIDump: Static files overwrite their destination.
This commit is contained in:
parent
8406a37ac2
commit
61af77a5c5
@ -321,6 +321,7 @@ function DumpAPIHtml()
|
|||||||
cFile:CreateFolder("API/Static");
|
cFile:CreateFolder("API/Static");
|
||||||
local localFolder = g_Plugin:GetLocalFolder();
|
local localFolder = g_Plugin:GetLocalFolder();
|
||||||
for idx, fnam in ipairs(cFile:GetFolderContents(localFolder .. "/Static")) do
|
for idx, fnam in ipairs(cFile:GetFolderContents(localFolder .. "/Static")) do
|
||||||
|
cFile:Delete("API/Static/" .. fnam);
|
||||||
cFile:Copy(localFolder .. "/Static/" .. fnam, "API/Static/" .. fnam);
|
cFile:Copy(localFolder .. "/Static/" .. fnam, "API/Static/" .. fnam);
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -428,11 +429,18 @@ function DumpAPIHtml()
|
|||||||
WriteClasses(f, API, ClassMenu);
|
WriteClasses(f, API, ClassMenu);
|
||||||
WriteHooks(f, Hooks, UndocumentedHooks, HookNav);
|
WriteHooks(f, Hooks, UndocumentedHooks, HookNav);
|
||||||
|
|
||||||
-- Copy the static files to the output folder (overwrite any existing):
|
-- Copy the static files to the output folder:
|
||||||
cFile:Copy(g_Plugin:GetLocalFolder() .. "/main.css", "API/main.css");
|
local StaticFiles =
|
||||||
cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.js", "API/prettify.js");
|
{
|
||||||
cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.css", "API/prettify.css");
|
"main.css",
|
||||||
cFile:Copy(g_Plugin:GetLocalFolder() .. "/lang-lua.js", "API/lang-lua.js");
|
"prettify.js",
|
||||||
|
"prettify.css",
|
||||||
|
"lang-lua.js",
|
||||||
|
};
|
||||||
|
for idx, fnam in ipairs(StaticFiles) do
|
||||||
|
cFile:Delete("API/" .. fnam);
|
||||||
|
cFile:Copy(g_Plugin:GetLocalFolder() .. "/" .. fnam, "API/" .. fnam);
|
||||||
|
end
|
||||||
|
|
||||||
-- List the documentation problems:
|
-- List the documentation problems:
|
||||||
LOG("Listing leftovers...");
|
LOG("Listing leftovers...");
|
||||||
|
Loading…
Reference in New Issue
Block a user