lapis-console
lapis-console copied to clipboard
Run the code as Lua instead of moonscript.
When pressing the run button, it sends the ?lang=moonscript parameter. How can I configure the console to use ?lang=lua ?
did you mean to close this?
Yes, I'm not sure this is an issue. It is more a feature request. I decided to fork the lapis-console and attempt to fix it myself. I have changed the lang variable to lua, but my print don't work. Is there an easy way to use the console with lua code instead of moonscript?
Sure, the change should be really easy, just a couple lines. (Also features requests are okay for the issue tracker)
Looks like it's mostly set up, I just forgot to write the code.
You'll want to do a Lua loadstring similar to how there's a moonscript.loadstring:
https://github.com/leafo/lapis-console/blob/master/lapis/console/init.moon#L96
@zunware did you manage to add the feature, can you merge it in/submit a PR? As a Lua newbie I want to use just plain Lua for now.
Somewhat related: https://github.com/leafo/lapis-console/issues/8
@lee-kagiso: I got it working with a hard-coded solution. I will work on a clean solution and submit it. I haven't submitted code before, so I will have to research that. I can share my hack to make it work with Lua if needed.
How're you going with this?
@lee-kagiso @vadi2 I just pushed the missing code with the changes needed to run code in lua instead of moonscript.
###Note:
You still need to change and uncoment the line 36 inside console/assets/main_js.lua for it to work.
I am a javascript noob and couldn't get a checkbox working for toggling lua/moonscript. If someone can get that working that would be awesome.
How come this has been closed?
my bad. Reopened.