demonnic / muddler

A build tool for Mudlet package developers
MIT License
40 stars 12 forks source link

Code in folders/groups #31

Closed demonnic closed 2 years ago

demonnic commented 2 years ago

This change allows you to include Lua code in the folders of your project tree. Which is to say, if you want to include some Lua in the script folder "Startup" your file tree would include

src/scripts/Startup/scripts.json
scr/scripts/Startup/Startup.lua

And the script folder Startup from the mpackage will contain the contents of Startup.lua. This is done automatically, without having to add anything to the json.

Resolves #13

Kebap commented 1 year ago

Thanks for including this option! Only doubt, will this prohibit a Mudlet script named "Startup" in the Mudlet folder "Startup" because the contents will automatically be put inside the folder? Or could you deliberately put a script with a same name in the folder anyway, if you were to specify it in scripts.json then? Not a requirement per se (maybe I will run into this down the line) but just for clarification now.