summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-12-29 13:24:38 +0100
committermadmaxoft <github@xoft.cz>2013-12-29 13:24:38 +0100
commit61af77a5c5c99ec82decc24ff8fca899f959e48a (patch)
tree9afa61f1cada884708b36d5979f1831b4af06b9b
parentAPIDump: The PRE html tag has tab width set to 2 spaces. (diff)
downloadcuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.tar
cuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.tar.gz
cuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.tar.bz2
cuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.tar.lz
cuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.tar.xz
cuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.tar.zst
cuberite-61af77a5c5c99ec82decc24ff8fca899f959e48a.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/main_APIDump.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua
index ff837ec4e..b3a95eb22 100644
--- a/MCServer/Plugins/APIDump/main_APIDump.lua
+++ b/MCServer/Plugins/APIDump/main_APIDump.lua
@@ -321,6 +321,7 @@ function DumpAPIHtml()
cFile:CreateFolder("API/Static");
local localFolder = g_Plugin:GetLocalFolder();
for idx, fnam in ipairs(cFile:GetFolderContents(localFolder .. "/Static")) do
+ cFile:Delete("API/Static/" .. fnam);
cFile:Copy(localFolder .. "/Static/" .. fnam, "API/Static/" .. fnam);
end
@@ -428,11 +429,18 @@ function DumpAPIHtml()
WriteClasses(f, API, ClassMenu);
WriteHooks(f, Hooks, UndocumentedHooks, HookNav);
- -- Copy the static files to the output folder (overwrite any existing):
- cFile:Copy(g_Plugin:GetLocalFolder() .. "/main.css", "API/main.css");
- cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.js", "API/prettify.js");
- cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.css", "API/prettify.css");
- cFile:Copy(g_Plugin:GetLocalFolder() .. "/lang-lua.js", "API/lang-lua.js");
+ -- Copy the static files to the output folder:
+ local StaticFiles =
+ {
+ "main.css",
+ "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:
LOG("Listing leftovers...");