The user script name comes from the filename, not from the exported function name. I never thought of calling them anything else - main
was what was in the docs. It doesn’t appear anywhere.
The rest of your post is just preference. I do it the way I do it because I prefer to write this.foo()
instead of tp.user.scriptFilename().foo()
. Plus I only want to execute the scriptFilename
function or class one time. But just do whatever you prefer, it’s all fine and it all works.
One day I might clean it up and publish it, but you can get the general overview from my vault here: