kbrsh / moon

🌙 The minimal & fast library for functional user interfaces
https://moonjs.org
MIT License
6k stars 200 forks source link

Alternate templating engine #159

Closed kokujin closed 7 years ago

kokujin commented 7 years ago

Is it possible to configure another templating engine instead of Mustache?

kbrsh commented 7 years ago

Do you mean the delimiters?

For example, the delimiters {, } would look like:

<h1>{foo}</h1>

Edit: If so, then it isn't possible. It was possible in earlier versions, but added an extra 0.5kb weight (which is a lot for just a simple thing). Hard-coding them would take out a lot of the optimizations already done.

kokujin commented 7 years ago

I just re-read the docs:

Moon has a custom templating syntax similar to Mustache.

i'ts not actually the Mustache engine . I wanted to use extendable templates as in Jinja2, Nunjucks.

kbrsh commented 7 years ago

@kokujin Ahh, yes. Moon's templating engine is custom-made and a little different from mustache.

kokujin commented 7 years ago

I would have to try some things out to solve that problem then. Thanks.