Canonical ember template compiling


There are a lot of packages floating around on NPM and Github for pre-compiling Ember templates. There are a lot of problems afflicting these packages.

  • Don’t work properly.
  • Use out of date version of Ember &/or Handlebars.
  • Use out of sync version of Ember & Handlebars (this is confusing on its own).

I’ve only had consistent, reliable success with two packages - ember-rails and grunt-ember-templates. Unfortunately, both of these pretty much require that I commit to using either Rails or Grunt for my project.

My suggestion is that there be a canonical NPM package release based off of the internal template compiler. This way, other packages could standardize their compilation workflows off of this base, rather than everyone inventing their own.



@joliss has been doing some investigation into improving Ember package distribution and the build process. It’s definitely something we want to work on.


I think part of the challenge might be to make sure that the Ember+Handlebars versions in the browser exactly match the ones in the precompiler. @stefan.penner and I are working on some stuff to make the build process better, but it’s still not entirely clear to me how we can make sure that the client-side and server-side Ember versions are the same.

It’s definitely something worth solving.


Keeping Ember up-to-date in NPM would be a start. Last I checked only RC2 was available through NPM. If Ember was current, compilers could list Ember and Handlebars as a dependency and then use Ember’s compiler instead of rolling their own code. Or copy/pasting from Github.