compile templates to js