-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small Changes to Parent Template Not Detected #47
Comments
It appears to be a problem with Gulp (Gulp 4 in this case). The timestamp of the output file is not being updated - in fact, the timestamp is being set 'back' in time 0_0. |
As I had already commented: #46 (comment) Same issue happened with me as well which I fixed by commenting source maps code in gulp file. Though, I am not sure whether you are using sourcemaps or not. |
Okay I think I've found the problem. The timestamp is not being updated, because the page template has not been changed, only the parent template - and the source file object is being reused here Thinking about this a bit more, in most cases this is the desired behavior, however, in a cases where parent template files are updated, all of the child templates will need to be 'touched', or alternatively, perhaps there could be a 'force-update' option. Not sure. |
Here's the complete task, showing how in Gulp 4 - we can use the 'since' option to ignore pages that have not been updated. This takes care of any templates that should be ignored, because there have been no changes, however, it doesn't solve the parent template problem, which should force a complete re-compile and re-render, with new timestamps for all child templates. Of course Git and the IDE will detect larger changes based on file size, but smaller changes in a parent template (less than a block size for the file on disk) will go undetected.
|
Here's the related Gulp issues, although not sure what the outcome is here... gulpjs/gulp#1461 |
Here's my interim solution.... using gulp-shell.
|
Are there any updates on this? I'm having a very similar, if not the exact same issue. Detailed here: https://stackoverflow.com/questions/49233603/detect-changes-between-multiple-source-files-using-gulp |
Sorry - re-opening this, as it's not the IDE. I just tried editing and compiling the parent template in Vim and the same problem occurs.
Have a weird problem with nunjucks. When I make small changes to a comment section in a parent template, the 'page' template that extends the parent, does not get compiled (although the file to be compiled is being passed to nunjucks). If I type an extra word or two in the source parent template, all works as expected. I suspect this is a nunjucks problem, and not gulp-nunjucks-render - but thought I'd post here as well just in case I'm missing something obvious.
Here's the issue I've posted with nunjucks... mozilla/nunjucks#811
The text was updated successfully, but these errors were encountered: