Changeset

13005:1167aaf1aa1f

teal-src/README: Words on Compiling to Lua
author Kim Alvefur <zash@zash.se>
date Tue, 28 Mar 2023 11:42:20 +0200
parents 13004:47efa93ea859
children 13006:d943733c6d01
files teal-src/README.md
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/teal-src/README.md	Tue Mar 28 11:42:09 2023 +0200
+++ b/teal-src/README.md	Tue Mar 28 11:42:20 2023 +0200
@@ -24,6 +24,23 @@
 support](https://github.com/teal-language/tl#text-editor-support)
 
 
+## Compiling to Lua
+
+`GNUmakefile` contains a rule for building Lua files from Teal sources.
+It also applies [LuaFormat](https://github.com/Koihik/LuaFormatter) to
+make the resulting code more readable, albeit this makes the line
+numbers no longer match the original Teal source.  Sometimes minor
+`luacheck` issues remain, such as types being represented as unused
+tables, which can be removed.
+
+```bash
+sensible-editor teal-src/prosody/util/example.tl
+# Write some code, remember to run tl check
+make util/example.lua
+sensible-editor util/example.lua
+# Apply any minor tweaks that may be needed
+```
+
 ## Files of note
 
 `module.d.tl`