gulp-jade-inheritance icon indicating copy to clipboard operation
gulp-jade-inheritance copied to clipboard

The usefulness of the "changed" plugin

Open ghost opened this issue 10 years ago • 6 comments
trafficstars

Hi Juan!

Could you explain more clearly the usefulness of the "changed" plugin?

What would be the purpose? Why would anyone want to monitor the files that have been compiled?

//only pass unchanged *main* files and *all* the partials
.pipe(changed('dist', {extension: '.html'}))

Thank you for publishing this package :)

ghost avatar Feb 03 '15 13:02 ghost

Hi @joelcipriano

it is for performance, if your project has dozens of .jade the compilation could take too long

juanfran avatar Feb 03 '15 16:02 juanfran

Sorry @juanfran, but I still do not understand. If only .jade files are monitored for changes, why listening .html files that already have been compiled?

ghost avatar Feb 08 '15 20:02 ghost

bacause gulp-changed checks the last modified date, if example.html is less recent than example.jade then gulp-changed pass through example.jade

sorry if I haven't explained well

juanfran avatar Feb 09 '15 16:02 juanfran

Ok. Got it!

Have you tested with more than 100 files? I used this solution in a project with 62 pages and 108 includes. The CPU usage hit the sky and the compilation stopped working :/

ghost avatar Apr 28 '15 17:04 ghost

at the beginning or after a change? I have a project with many files too and it works well https://github.com/taigaio/taiga-front/blob/master/gulpfile.js

juanfran avatar May 01 '15 15:05 juanfran

This has gone a little off-topic, but I get the same 'hanging'. Using gulp-changed works fine for me, that's not an issue. But if I use jade-inheritance on watched include files, which triggers recompile of 65 jade files it takes several minutes and hangs gulp at 100% cpu. Most of that time is spent in futex by an strace.

siliconalchemy avatar Feb 09 '16 17:02 siliconalchemy