From 85970df24bcdc61467b2662fde30d5a9a737ee9f Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Thu, 27 May 2021 23:38:02 -0700 Subject: [PATCH] Add config & script for generating HTML docs with LDoc --- docs/config.ld | 9 +++++++++ docs/gendoc.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 docs/config.ld create mode 100644 docs/gendoc.sh diff --git a/docs/config.ld b/docs/config.ld new file mode 100644 index 0000000..00e75c4 --- /dev/null +++ b/docs/config.ld @@ -0,0 +1,9 @@ +project = "wconfig" +title = "World Config" +format = "markdown" +not_luadoc = true +boilerplate = false + +file = "api.lua" + +new_type("falias", "Aliases") diff --git a/docs/gendoc.sh b/docs/gendoc.sh new file mode 100644 index 0000000..0c3a0dc --- /dev/null +++ b/docs/gendoc.sh @@ -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" "${DOCS}/source" +# Create new files +ldoc -c "${CONFIG}" -d "${DOCS}" -o "api" "${ROOT}"