Easy way to precompile Emberjs Handlebar templates with nodejs?

前端 未结 8 1854
耶瑟儿~
耶瑟儿~ 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:07

    I've published a version of ember-precompiler with a similar interface to the handlebars command line utility. You can install it from NPM:

    npm install -g ember-precompile
    

    and then run it as:

    ember-precompile template... [-f OUTPUT_FILE]
    

    It does essentially what you describe (and what the gist versions do too): mock out the missing components needed to run Ember and Handlebars, compile the templates and add them to Ember.TEMPLATES.

提交回复
热议问题