managed to get a build.js script working for r.js optimizer