Our great sponsors
-
nunjucks
A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
What you are searching for is a template engine. There are a lot for node. I think you should try to implement https://mozilla.github.io/nunjucks/ which is pretty similar to the Jinja syntax :)
I’m sure it can be done some other way (see https://github.com/yan-foto/electron-pug) but even then, this just doesn’t make a lot of sense. You’re going to have an unpleasantly unresponsive UI this way I suspect.