when watching entire directory, don't rebuild files outside said directory
#2491 - small fix to the CLI so that non-underscored files outside the watched directory (but imported as part of the tree) are not built.
@xzyfer I've written a test for this with a fixture but skipped it as it looks like you're skipping most of the async tests? Let me know if you want me to add that back in to the list.
/cc @Gwerlas
@nschonni do you know who could take a look at this?
It looks to me that https://github.com/sass/node-sass/issues/2491 https://github.com/sass/node-sass/issues/2504 https://github.com/sass/node-sass/issues/2560 and partially https://github.com/sass/node-sass/issues/2479 have the similar root cause.
We constantly maintain a graph of dependencies and we try to rebuild everything on that graph that does not start with underscore.
This is probably not correct - we should maintain two trees:
- dependency graph
- expanded original input specification
We should react to all events on the dependency graph, but only files on the original input specification should ever be compiled.
Looking at that code:
https://github.com/sass/node-sass/blob/8d0accabd61ee5cb16248474f2989209b6200e50/bin/node-sass#L248-L252
we should not fire compilation of the changed file as a response to the changed event - only affected original files should be subjected to rendering.
Any thoughts @xzyfer , @nschonni ? If yes, this would mean a major change in our watching code.