#KubeJS utility functions
17 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
you dont need to use import, all files in each folder types are loaded into one global scope
by folder type i mean startup/server/client
if you want to use it in your startup scripts, yes
ok so I would need one for each folder type then
that's fine
does load order matter? wait I could just use hoisting
you can make it fully global
but for that you should put the util file in startup, and assign each function/variable that you want to use outside of it, to global
so instead of function doSomething(), you do global.doSomething = () => {}
ah ok
the global variable is an object that works across all scripts
thanks!