Answer the question
In order to leave comments, you need to log in
Organization pug?
Hello everyone, I decided to try pug. Everything seems to be clear with the syntax, but I don’t understand exactly the organization of files, crushing, connecting mixins and includes, and so on. Is there an article on these things or a good example?
And how do you generally organize work with pug in your projects?
Answer the question
In order to leave comments, you need to log in
I do not pretend to be correct, but I found this option convenient for myself:
Each component is a pug mixin. Mixins can be nested, for example:
+ make layout.pug, from which @extend-im all pages, include the necessary components and at the end we call mixins
In general, quite reusable blocks are obtained along with markup, logic, styles and content. This is very easy to pull on Express or just throw it from project to project.
No, further as you need, fractions as you want, organize as you like. What is the meaning of some kind of manual?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question