Have r.js optimizer create new index.html file that references built files?

When i use r.js to optimize my project, how do I get it to produce a single index.html file that includes only one script (my optimized script) and one css file (my optimized css)? Is this something I would need to write myself post build?

r.js don't include this option built-in. But with a full stack build tool, this will be achievable. I'd recommend grunt.js for this (you'll probably want to take a look at how to create custom grunt task for this though).