summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-08-29 17:20:55 +1000
committerjacqueline <me@jacqueline.id.au>2024-08-29 17:20:55 +1000
commit3d484211a5b485fa40f22ebd58006ad64d4c4c3e (patch)
tree9f71eeda88de1be22db9ffc7f099e121842160e0 /tools
parent91eaed4b37c7cda29103d3478df3e2c6356f8396 (diff)
downloadtangara-fw-3d484211a5b485fa40f22ebd58006ad64d4c4c3e.tar.gz
Add reference doc regen instructions
Diffstat (limited to 'tools')
-rw-r--r--tools/luals-gendoc/README.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/luals-gendoc/README.md b/tools/luals-gendoc/README.md
new file mode 100644
index 00000000..b676aa16
--- /dev/null
+++ b/tools/luals-gendoc/README.md
@@ -0,0 +1,20 @@
+# Prerequisites
+
+ - lua-language-server
+ - a Lua interpreter version >= 5.2
+
+# Regenerating the Lua reference docs
+
+1. Invoke `lua-language-server` to parse our stubs, generating json output:
+
+```
+$ lua-language-server --doc=../../luals-stubs
+```
+
+2. The output will include the path to the raw json data. This will be a path like '/home/jacqueline/Development/lua-language-server/log/doc.json'. Pipe this file to `gendoc.lua`. The output will be quite long; consider piping to less for testing.
+
+```
+$ cat /home/jacqueline/Development/lua-language-server/log/doc.json | ./gendoc.lua | less
+```
+
+3. If updating the public-facing docs on cooltech.zone, place the resulting output in 'content/tangara/docs/lua/reference.txt'.