문제

I want to compile dust.js template on server for some cases, but i don't have any idea about it. On server use Play framework + Java, so how to compile dust template on server? anybody have ideas ?? please help me solve this problem. thank you

도움이 되었습니까?

해결책

You have to get a JavaScript interpreter to compile dust.js templates on the server. You can do it either using Node.js or Rhino or using ScriptEngine included in the JDK. Also refer Scripting: Compiling Scripts in Java 6.

다른 팁

If you're using Grunt for running build tasks, then you could compile your dust templates on the fly with the dust compiler plugin (below):

https://www.npmjs.org/package/grunt-dust-compiler

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top