casid / jte-intellij

IntelliJ plugin for jte template files.
https://github.com/casid/jte
Apache License 2.0
23 stars 5 forks source link

Embed web server to preview templates #42

Closed daniel-shuy closed 10 months ago

daniel-shuy commented 10 months ago

Thanks for jte! It is the best template engine I've seen by far!

There's just one feature that I think would make this perfect - the ability to preview templates without have to start the full application or write a web server to render the templates as HTML. I'm guessing this can be done by embedding a web server in the Intellij plugin, something like the SimpleWebServer.

I'm not sure if its possible, but it would be even better if the rendered HTML can be displayed in Intellij itself, like when previewing HTML files with WebStorm/Intellij IDEA Ultimate.

casid commented 10 months ago

Hi @daniel-shuy, thank you very much for the heads up!

Unfortunately, what you suggest is not possible with jte, or if so, it would take a lot of effort and not be feasible for any maintainer.

As a template can have various parameters the preview mechanism would need to know about these parameters. It would also need to create instances of those with meaningful defaults. That's beyond the scope of the jte plugin.