Well, there are no include or require statements in JS, so the only way you can do it is to put both script tags in index.html.
However, you have an ability to check then. In scripts.js you would use this:
Code:
if(typeof yourFunctionName == 'function') {
//the rest of your code
}
Replace yourFunctionName in the above statement with a function name that is found in Required.js. If Required.js has been loaded, then typeof will return 'function' - voila - a way to 'require' javascript.
I've switched careers...
I'm NO LONGER a scientist,
but now a web developer...
awesome.
Bookmarks