About jade -w’s inability to update include files in real time

  node.js, question

clipboard.png

This is my project structure. I want to compile jade files in tpl into the root directory of the project in real time.
index.jadeChina,includeThehead.jadeas well asfooter.jadeTwo files, code is as follows:

html
 include head
 
 body
 h1 test
 include footer

Knock on nodejs command linejade -P -w tpl -o ./
Whenhead.jadeModify orfooter.jadeAfter modification, the correspondinghead.htmlAndfooter.htmlAll updated,
butindex.htmlNo updates.
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.