this PR allows seamstress' include to work even closer to norns'.
indeed on norns, inside a script ~/dust/code/script/script.lua, to require ~/dust/code/script/lib/lib.lua, one can use:
include("lib/lib.lua") (relative to script dir)
include("script/lib/lib.lua") (relative to ~/dust/code/)
this PR adds support for the 2nd form, by conditionally adding in the paths looked up by include the script parent folder if it's present ad the 1rst element in the path passed as argument.
this PR allows seamstress'
include
to work even closer to norns'.indeed on norns, inside a script
~/dust/code/script/script.lua
, to require~/dust/code/script/lib/lib.lua
, one can use:include("lib/lib.lua")
(relative to script dir)include("script/lib/lib.lua")
(relative to~/dust/code/
)this PR adds support for the 2nd form, by conditionally adding in the paths looked up by
include
the script parent folder if it's present ad the 1rst element in the path passed as argument.