Adding script to generate tbx.js file. Closes #1527