This is my project structure. I want to compile jade files in tpl into the root directory of the project in real time.
head.jadeas well as
footer.jadeTwo files, code is as follows:
html include head body h1 test include footer
Knock on nodejs command line
jade -P -w tpl -o ./
footer.jadeAfter modification, the corresponding
I would like to ask, what is the reason?
Is it because of the instructions or jade’s own working mechanism?
Is there any solution?
In fact, jade has not used the global command provided by jade. It should look like JADE does not analyze the file dependencies.
The way I can mention is to use grunt or gulp. They all have jade plug-ins, and their watch task allows you to customize the dependency relationship (but it feels like repetitive work, as if there is no automatic analysis of jade dependency, so they all write all other files and rely on all of the include files), and then compile the corresponding files automatically. . . Otherwise, the landlord can write his own makefile cmake ant and so on.