I am trying to write an SBT plugin for PlayFramework 2.1 that would precompile the descriptor templates located in app / assets / templates. Of course, I will share this plugin when it is complete. I found this method http://eng.netwallet.com/2012/04/25/emberhandlebars-template-precompilation-with-play/ , which was a bit outdated, but that is not a problem by adapting it for Play! 2.1.
Then I tried to compile a simple template file, but SBT was unable to complete the following steps:
ember: processing template test
[error] /.../templates/test.handlebars: Compilation error[unexpected exception during Ember compilation (file=/.../templates/test.handlebars, options=List(), ember=ember-1.0.0-pre.4.js): org.mozilla.javascript.EvaluatorException: missing name after . operator (ember-1.0.0-pre.4.js#3309)]
[error] (MyProject
ember-1.0.0-pre.4.js on line 3309 has the volatile keyword, which seems to be reserved in Rhino.
I am far from an expert in Rhino, so I wonder if anyone knows how to get around this? I'm not looking for a 5 * solution right now. Any solution (even quick and dirty hacks, such as using custom ember.js) that has reasonable chances to work with most simple pen templates will work, and we will worry about polishing it after the functionality is there, and the SBT plugin missing.
Thanks in advance!
source
share