auto-generate modules.js and tests.js