app / Assets/templatesにあるハンドルバーテンプレートをプリコンパイルするPlayFramework2.1用のSBTプラグインを作成しようとしています。もちろん、このプラグインが完成したら共有します。このハウツーhttp://eng.netwallet.com/2012/04/25/emberhandlebars-template-precompilation-with-play/は少し時代遅れでしたが、Playに適応させるのに問題はありませんでした。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
3309行目のember-1.0.0-pre.4.jsにはvolatileキーワードがあり、これは明らかにRhinoで予約されています。
私はRhinoの専門家からはほど遠いので、誰かがこれを回避する方法を知っているかどうか疑問に思っていますか?現在、5*ソリューションを探していません。ほとんどの単純なハンドルバーテンプレートで機能する可能性が十分にあるソリューション(カスタムのember.jsを使用するような迅速で汚いハックでも)は機能します。機能があり、SBTプラグインがなくなったら、それを磨く必要があります。
前もって感謝します!