Easy way to precompile Emberjs Handlebar templates with nodejs?

前端 未结 8 1729
耶瑟儿~
耶瑟儿~ 2021-02-01 09:59

I\'m enjoying emberjs a lot and would like to take the next step in a couple of my small, mobile apps and precompile my Ember/Handlebars templates as part of my build process.

8条回答
  •  遇见更好的自我
    2021-02-01 10:12

    I've written a grunt plugin called grunt-ember-handlebars that does exactly this. It pretty much mimics Garth's script, with one important difference:

    It uses lib/headless-ember.js and lib/ember.js, which are maintained (at least for now) by ember.js to precompile default templates. If you don't want to use grunt, you can extract the relevant code from the precompile_handlebars helper in tasks/ember-handlebars.js.

提交回复
热议问题