View source to see the code.
This example uses data-main to load index.js, which requires fruits.js.
data-main
index.js
fruits.js