Closed tehn closed 6 years ago
use require
instead of dofile
and add lcoations to package.path
http://www.lua.org/pil/8.1.html
have added config.lua
to set package.path
.
core lua files are in lua/sys
user programs are in lua/scripts
can add more as needed
currently all of the lua scripts live in the same place. eventually we'll need to split the app-level files and user-files into different locations.
first draft proposals:
~/norns/config.lua
config file (last used script, state, etc?)~/norns/script
user scripts (including default scripts)~/norns/state
corresponding states for scripts~/norns/audio
audio filessome sort of user-install script can set this up, copy default scripts etc.
this way the
norns.lua
,helper.lua
, etc will be in the application folder, away from user manipulation. (though users manipulating this stuff is fine, it should just be separated).of course, this makes development a little annoying, so it can wait probably