Answer the question
In order to leave comments, you need to log in
What html preprocessors do you use?
Hello!
I use Pug (Jade) for layout. But he does not quite suit me. In particular, do not like the attachment to the indents. I looked at Haml, it's the same.
In principle, I'm quite satisfied with the usual html. The only thing missing is the nesting of templates and loops, i.e. something like Blade from Laravel. Is there any equivalent for Node.js?
Answer the question
In order to leave comments, you need to log in
Are there still those who use such complex html preprocessors?
Why don't you like Emmet? Master it and you'll never rack your brains with a node again.
As far as I can tell, Noda is closely tied to pug / jade.
And from other template engines, I saw such opportunities only in bem-xjst
EJS - as an option, you can write your own View class for it, which will process templates as you like. You can make tags and includes and anything. Its plus is that nothing is confusing and everything is clear, easy to learn. The downside is that all modifications will have to be finished by hand (I did this on one of my projects - I'm happy).
He himself went through Jade and was also not completely satisfied with him. There were pluses, but there were also minuses, and in general it turned out not better, but just somehow differently. I also looked at alternatives, and liked them even less.
Twig and others like it - kmk, are good as template engines, but not as an HTML preprocessor, that is, also by.
So I went back to bare HTML. You can optionally add Emmet, but somehow it didn’t work for me.
And then it turned out that cycles are well implemented in Angular / React / Vue (underline the right one to taste), so it became superfluous to screw in the preprocessor as well.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question