N
N
Nikolai Gromov2016-06-30 16:25:02
Pug
Nikolai Gromov, 2016-06-30 16:25:02

How to collect many small jade/pug files with impurities?

I do layout. There are many components with jade in separate files, all components are mixins (called in page files).
What is the least painful way to build a project (without manually including component files)?
Before compiling jade, it comes to mind to go through the page files before compiling jade, collect all the mixin calls, form a file with mixin inclusions based on the resulting list and include it in the page files. What silently resembles hemorrhoids)))
Are there any other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-06-30
@werty1001

Yeah, jade really lacks a dynamic include, like stylus import '../blocks/**/*'. In my opinion, to form a list of files to include into one before compiling is the only way out or to do everything manually (which is even worse).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question