Add config & script for generating documentation with LDoc

This commit is contained in:
Jordan Irwin 2021-05-05 05:22:08 -07:00
parent 88b9d434e1
commit 9449bf87e2
2 changed files with 20 additions and 0 deletions

8
docs/config.ld Normal file
View File

@ -0,0 +1,8 @@
title = "Another Spawneggs Mod for Minetest"
project = "asm_spawneggs"
format = "markdown"
not_luadoc = true
--wrap = true
boilerplate = true
file = {"api.lua",}

12
docs/gendoc.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
DOCS="$(dirname $(readlink -f $0))"
ROOT="$(dirname ${DOCS})"
CONFIG="${DOCS}/config.ld"
cd "${ROOT}"
# Clean old files
rm -rf "${DOCS}/api.html" "${DOCS}/scripts" "${DOCS}/modules"
# Create new files
ldoc -c "${CONFIG}" -d "${DOCS}" -o "api" "${ROOT}"