When I was testing out some things using the open source library. I have something like this:
-rwxr-xr-x 1 rmiracle staff 339 May 19 20:59 config.lua drwxr-xr-x 5 rmiracle staff 170 May 19 21:10 images -rw-r--r-- 1 rmiracle staff 2421 Jun 12 21:58 main.lua drwxr-xr-x 16 rmiracle staff 544 May 20 21:05 widgetLibrary -rwxr-xr-x@ 1 rmiracle staff 16388 May 18 04:14 widgetx.lua
I move the widget.lua out of that folder and into the folder with my main.lua (and renamed it widgetx.lua).
That way my code can still do:
local widget = require(“widgetx”)
or
local widget = require(“widget”)
and not have to mess around with my requires other than changing the file name. Though it seems if you left the files where they are, you should:
local widget = require(“widgetLibrary.widget”)