D
D
Dmitry Sergeevich2015-11-18 18:30:15
Pug
Dmitry Sergeevich, 2015-11-18 18:30:15

How to properly store and include mixins in JADE?

Hello! Just started using JADE as my main templating engine.
At the moment, I faced the question: How to store and connect mixins in JADE?
I have accumulated 5-6 main mixins for displaying typical blocks, I store them all in my template.jade and call them where necessary. Since I am an adherent of the modular structure of the project, this question haunts me. Having stuffed it into folders, I tried to include them, but it's all useless.
Tell me how to be? Include or leave everything as it is in template.jade?
If someone explains how to correctly include so that the mixin can be called anywhere, that +1,000,000 in karma!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jlekapb, 2015-11-18
@CheckOneTwo

I have a separate folder with mixins, where each file has a separate mixin.
Then there is mixins.jade in which I connect the mixins needed in the project, and I add mixins.jade to the template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question