我試圖寫一個SBT插件PlayFramework 2.1這將預編譯位於應用程序/資產/模板車把模板。當然,我會在完成時分享這個插件。我發現這個怎麼樣http://eng.netwallet.com/2012/04/25/emberhandlebars-template-precompilation-with-play/這有點過時了,但這對於Play來說並不是問題! 2.1。Playframework 2.1預編譯燼車把
然後我試圖編譯一個簡單的模板文件,但SBT失敗,出現以下:
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/*:play-copy-assets) @6dap83075: Compilation error in /.../templates/test.handlebars:null
[error] (MyProject/compile:resources) @6dap83075: Compilation error in /.../templates/test.handlebars:null
燼-1.0.0-pre.4.js在行3309具有volatile關鍵字,這顯然是保留在犀牛。
我遠在犀牛的專家,這就是爲什麼我想知道,如果有人知道的方式來解決此問題?我現在不在尋找5 *解決方案。任何解決方案(即使是使用自定義ember.js的快速和骯髒的黑客)都有合理的機會爲大多數簡單的車把模板工作,並且我們會擔心在功能出現並且SBT插件不在時拋光它。
在此先感謝!
你能發佈的代碼容易重現該問題? – Schleichardt 2013-02-17 20:34:40
你還在做這個項目嗎?我有興趣使用它。 – 2013-04-01 13:17:42