wait for templates before js build