darklua
darklua copied to clipboard
convert_require support for replacing sources / aliases with their relative string pathways
Hello! I've been using darklua for a few weeks now and I'm really liking it! While using it I came across a relatively new painpoint when using it to deploy code across lune and roblox.
Use Case
I have a few projects that have modules which deploy to both a lune env and a roblox env. I don't tend to use the same aliases in the lune environment.
Example Output
source:
local Enums = require("@shared/Enums")
typical roblox conversion:
local Enums = require(script.Parent.Parent.Parent:FindFirstChild("Enums"))
requested feature that would run in lune without much fuss:
local Enums = require("./../../../Enums")
Conclusion
This isn't a blocker for me anymore - I wrote up a slow bash script that I run afterwards to convert a property-path to the requested format, however it has flaws, and I think that as lune grows in popularity there are only going to be more people who use darklua to deploy across multiple env with separate alias configs.
Thank you for your time!