I'm wondering what's the best way to save precompiled handlebar templates and include them in an HTML file.
The site: http://handlebarsjs.com/precompilation.html simply advises to call
handlebars infile -f outfile
I put a template in a file and called the command. I got a JS file containing a function program1 How would I now compile a second template? The sample at http://jsperf.com/jquery-template-vs-handlebars contains multiple functions named program[1-9](...)
I assume they somehow must be generated.
Is it good advice to store precompiled templates at all?
I saw samples embedding script or link tags in an HTML file and traversing these and via AJAX loading the templates and compiling them dynamically.
Best, Bernhard