I added a new _blog-live.js file with some functions in assets/js/.
They were getting compiled into the scripts.js file but I couldn’t call them from _main.js. Is there any particular way i need to call them? Or does the new file need to be wrapped in anything?
You need to ensure that if one file depends on functions or variables in another that the dependencies are enqueued or concatenated first. But this isn’t just Roots, it’s Javascript 101.
You have a scoping problem because of the use of the self-executing anonymous function that it is wrapped in. You may want to look at this for a more detailed explanation. I would also suggest you look at module design pattern/object literal patterns here and here for better understanding of advanced javascript organization.
I believe ewafford is correct. The only reason to place something in an anonymous self-invoking function is to run that code. If you’re setting up a function to called in another location, then that should not be wrapped in anything.