This line is getting out of hand..Even jshint is complaining ;)
I suggest something like
```js
return data.replace('%SCRIPTS%', scriptTags.join('\n'))
           .replace('%MAPPINGS%', mappings)
           .replace('%AUTOSTART%', autoStart);
```