build template.js