Compile HTML template to JS