Closed djedlajn closed 7 years ago
Can you please add gulb-debug to your task, like in this gulpfile.js and post the result of the terminal?
Please also add a log to gulp-filter, to see the file path that you are filtering on.
...
.pipe(filter(function (file) {
// Added views to exclude folder from building.
console.log(file.relative);
return !/\/_/.test(file.path) && !/^_/.test(file.relative) && !/views/.test(file.relative);
}))
...
I think i found what is causing the issue. It is the subtle change in jade/pug api from v1 to v2
In Pug v1, if no file extension is given, .pug is automatically appended to the file name, but in Pug v2 this is behavior is deprecated. Link
It is really subtle, but it appears to have fixed includes not being detected. Will test more and be back with updates.
Edit: For plugin to pickup changes correctly on v2 version of API appending .pug extension to includes is required.
<!DOCTYPE html>
html(lang="en")
// Include needs to have .pug extension !
include views/_block.pug
body
.test
h1
By setting the default file extension, like described in the readme to gulp-pug-inheritance will fix this too. Will close this issue, you can write here if you still facing issues.
Have the same issue but with an error:
2017-05-02 14:59 gulp[1416] (FSEvents.framework) FSEventStreamFlushSync(): failed assertion '(SInt64)last_id > 0LL'
It's only on included files.
Root files are compiled one-by-one, as expected.
gulpfile
Oops looks like my problem is in Node itself: https://github.com/nodejs/node/issues/854
Hi,
Here is my setup, image for your convenience.
This is after compiling pug to html works as expected its just that changing partial does not trigger change.
Here is the JS file dedicated to compiling pug to html.
I have added views folder to be treated as partials because everything inside is meant to be partial. I did try with _ naming still wont trigger build on compile change.
Here is watch file.
Here is the config file just in case.
It compiles but when i change
block
pug file it does not trigger compile or detects change whatsoever. What am i missing ? For files to detect change i need to stop watch process delete files from dist run it again and then only it picks up.Any help would be appreciated.