How to render a precompile templates with gulp-handlerbars?


Hello everybody I’m try to understand what is the process to precompilete templates, so I use this process to precompilate the templates with gulpjs:, I dont get any problem all is ok!.

For example I’ve a template called index.hbs with the content “hello world”, in my index.html (entry point) I’ve the following

        <meta charset="utf-8" />
        <script src="js/vendors.js"></script>
        <script src="js/templates.js"></script>
        <script src="js/main.js"></script>

And the templates.js is:

this["Ember"] = this["Ember"] || {};
this["Ember"]["TEMPLATES"] = this["Ember"]["TEMPLATES"] || {};
this["Ember"]["TEMPLATES"]["app"] = this["Ember"]["TEMPLATES"]["app"] || {};
this["Ember"]["TEMPLATES"]["app"]["templates"] = this["Ember"]["TEMPLATES"]["app"]["templates"] || {};
this["Ember"]["TEMPLATES"]["app"]["templates"]["index"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data
/**/) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
    data.buffer.push("hello world.\n");


So, I don’t know how to render it, it would be magic?, just put <script src="js/templates.js"></script> and it render it ?

how to render the precompiled templates?