generate a JS from the JSON

so that we can test in the browser too