robbielyman / seamstress

seamstress is an art engine
GNU General Public License v3.0
123 stars 12 forks source link

feat: allow `include` to work on path including script's parent folder #53

Closed p3r7 closed 1 year ago

p3r7 commented 1 year ago

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:

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.