U
U
Ucorp2016-12-23 16:15:11
HTML
Ucorp, 2016-12-23 16:15:11

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

7 answer(s)
K
Kemal Demirel, 2016-12-24
@kemaldemirel

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.

V
Vasyl Kovbassa, 2016-12-23
@movasyl

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

A
Andrey Khokhlov, 2016-12-23
@andrhohlov

try handlebars

A
Al, 2016-12-23
@Sanu0074

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).

O
oilala, 2016-12-23
@oilala

I use Gulp-include to break code into blocks.

D
dom1n1k, 2016-12-24
@dom1n1k

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.

N
name surname, 2016-12-29
@symbol

you can try nunjucks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question