-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some way to bundle multiple .tl scripts as one Lua file? #67
Comments
That would be a cool feature, but would probably accelerate to the desire of some sort of source maps, because the line numbers in the tracebacks when running tl code would not match the input anymore (so this is a feature request that triggers another feature request :) ). Still, a patch would be welcome!
I'm still a bit on the fence for that tbh, but it's a thought to consider for sure! |
Just my 2¢: I think bundling should be handled by a separate utility. Bundling doesn't particularly sound like something that needs to be integrated into the compiler, or really even something that needs to be Teal-exclusive. |
This can be achieved using luapak merge. |
@jirutka would love to see luapak eventually convert .tl files to .lua in that same step! :) Do you think |
A stable programmatic API would be better. :) |
I have recently added 3rd-party plugin support to a tool of mine that can bundle multiple Lua modules into one Lua file. Apparently, those plugins can also be used to transpile files in a Lua dialect on-the-fly during amalgamation. As a proof-of-concept, I have added plugins for moonscript, fennel, and teal. AFAICS, a similar approach could be used with luapak -- maybe even with the same plugins. Regarding stable API: I've only used |
@siffiejoe that should be fine! |
I think it would be nice if we could use a command-line argument to bundle multiple tl scripts as a single Lua file. TypeScript supports this by using the
--outFile
argument.Right now, tl's source code is contained inside a single .tl file. If this feature gets implemented, then tl's source code could be split into multiple files. This would probably make the code a bit easier to browse.
The text was updated successfully, but these errors were encountered: