Generating main.js files