Created
January 26, 2025 20:51
-
-
Save taminomara/a54d24221f5692c46d1fa06a09f341dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Example loader implementation | |
return function(config) | |
-- Do some stuff to initialize your code loader here. | |
-- Config contains the relevant table from `BOOTLOADER_CONFIG.loaders`. | |
print("Loader config:") | |
for k, v in pairs(config) do print(" ", k, "=", v) end | |
return function(path) | |
-- Actual part that loads the code. | |
-- Let's do a simple 'hello world' example: | |
if path == "hello.lua" then | |
return "print('it works!')" -- File found, return its code. | |
else | |
return nil -- File not found. | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment