Closed JayaKrishnaNamburu closed 1 year ago
As documented at: https://facebook.github.io/watchman/docs/config.html#resolution--scoping, the ignore_vcs
is read from the .watchmanconfig
at the root of the repository, it cannot be changed with the Node API (or any other API for that matter).
Capabilities cannot be disabled, would you mind describing why you'd want some to be disabled?
And one more, if we disable
vcs
. Watchman will not trigger for changes uder.git
folder right ?
Do you mean setting ignore_vcs
to an empty list?
So, my use case ws to write a abstraction to watch for specific files in a monorepo and then build those specific packages again when changes. But when using watchman with node-api.
For every .git/ change i do, it tends to trigger my watchers. But, if i set ignore_vcs in etc/watchman.json to true. will it still trigger for changes in .git folder ? Is there any way that i can ingote .git folder changes to trigger my watchers ?
In your query you should be able to have an expression that ignores changes to the .git
directory with https://facebook.github.io/watchman/docs/expr/dirname.html.
Hey, thanks for the information. Got what i am looking for. Can i close the issue now 😄 👍
This issue didn't answer the original question – How do I pass arguments to Node.js API?
I am using the
node-api
for watching some files and running commands. https://facebook.github.io/watchman/docs/nodejs.html#initiating-a-watchBut, is there a way to pass arguments like
ignore_vsc
etc for the Node API ?. Or we just need to followwatchmanconfig.json
under/etc/
folder ?Or, are there commands to disable certain capability for watchman ?
And one more, if we disable
vcs
. Watchman will not trigger for changes uder.git
folder right ?Sorry, i wanted to post under GH - Discussions. But, looks like it is not enabled for the repo. And i couldn't find much examples