aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-28 11:42:20 +0200
committerKim Alvefur <zash@zash.se>2023-03-28 11:42:20 +0200
commit9305f475250df547e7be4599632020334d15ada4 (patch)
treed7170582327e59286f2c575e07479f4fdb237dc4 /teal-src
parent4a78b88efd588d88586ae175b6649fe079dbe891 (diff)
downloadprosody-9305f475250df547e7be4599632020334d15ada4.tar.gz
prosody-9305f475250df547e7be4599632020334d15ada4.zip
teal-src/README: Words on Compiling to Lua
Diffstat (limited to 'teal-src')
-rw-r--r--teal-src/README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/teal-src/README.md b/teal-src/README.md
index 6e3f9c26..e8c47035 100644
--- a/teal-src/README.md
+++ b/teal-src/README.md
@@ -24,6 +24,23 @@ Some editors and IDEs also have support, see [text editor
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`