Closed 1st8 closed 2 years ago
I'm not closed to this idea; are there any plugins that use this .glob
property? Dependency messages are standardized across the ecosystem, all runners will have to support this, cc @ai for thoughts.
postcss-mixins
uses glob
https://github.com/postcss/postcss-mixins/blob/main/index.js#L81-L86
It is part of standard https://github.com/postcss/postcss/blob/main/docs/guidelines/runner.md#31-rebuild-when-dependencies-change
Ah, wasn't up on the standards changes, in that case, LGTM.
This extends #383 to pass glob information on to chokidar, with the intention of reducing outputs when unrelated files are modified.
In my test example the output should only be triggered when files matching the
glob: '**/*.css'
are modified, but not when theunrelated.md
file is modified.A real world example where I thought watching a whole directory without applying the glob could be problematic, would be a full stack project where tailwind checks backend templates by file type for purging:
In this case I really only want to trigger rebuilds when changing one of the listed file types.
Chokidar supports all this out of the box btw.
Let me know what you think and thanks for the great project! Cheers!