Open megasoft1978 opened 2 months ago
It doesn't seem like it should be complicated. If I understand correctly, all it needs to do is run tl build
before running bob? That's it?
Language support already is here.
There will be a lack of debug, no idea how to support it. Probably something related to source maps.
@astrochili yes, I think it would be nice to have the debugger working. Also I'm not sure if the defold API code completion will work with it. Any idea?
No idea, I've never used Teal. But the questions raised are interesting:
@astrochili I think Teal just add types to Lua but we need source map for it in order to make the debugger works. No idea about the rest.
@astrochili I uploaded a very simple example here. TealTestProject.zip
test.lua
is actually generated using the command tl gen test.tl
from the main
folder.
Is this enough to give you an idea?
As I understand, we need to turn all Teal files into Lua files before the build of the game. Probably by running tl build
.
lua
scripts or also script
, gui_script
, render_script
?tlconfig.lua
for the whole current folder?There is good news about debugging, it looks like Teal saves line numbers in the generated Lua file. How exactly to debug it - we should see how it is done in ts-defold, as it uses the same debugging extension as the Defold Kit -local lua debugger
.
Unfortunately I don't have that much time and attention to look into this issue thoroughly, nor do I have a plan to use Teal yet. If we omit debugging, then just adding file generation is a doable task. But at least with Defold API annotations.
We need consistent instructions on how to do this manually:
tlconfig.lua
to run tl build
.@astrochili Let's postpone this to after Defold support Teal officially. At that point I guess it will be easier. Thank you. :)
Good idea 👍
Example of API implementation for Love2D
@astrochili That looks great! Let me know when you'll have a bit of time to look into it. I'm available to try out. :)
When the Defold beta is available you can try Teal. The build phase will be included in the bob.
So all we need to do is add to the Defold Kit:
Hi everyone, I'm wondering if it's possible to extend this tool to support the Teal language with full integration and automatic transpile to Lua. Defold team is already working on supporting the language in the editor but I actually prefer vscode. Is it possible?