0
votes

Is it possible to compile dust.js template to plain html?

I tried dusty and dustc serverside compilers but they generates a javascript file which will write the content of the template on the page.

2

2 Answers

1
votes

Dust only compiles to JavaScript, but you can use a compiled template to render plain HTML. This works the same on the server and on the client. On the server you need to use Node.js or Rhino (or some other engine that interprets JavaScript).

0
votes

It is possible to render a dust template directly to HTML, but it is not recommended. Anyway, this can be done with pyv8 a Python bindings for V8 JS engine. In this article Andrew Wilkinson show how he made it for mustache.js.