Skip to content
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

Watchmode does only knows initial files. #137

Open
chamabreu opened this issue Nov 3, 2022 · 5 comments
Open

Watchmode does only knows initial files. #137

chamabreu opened this issue Nov 3, 2022 · 5 comments
Labels

Comments

@chamabreu
Copy link
Contributor

Hi,

playing with watch mode, and it seems that it tracks only the files, which are there on the initial call.
If i add later folders or other .md files, they are not tracked.

Should this be like that?
I would like to have a dynamic watch, where I can add files, while watch is running.

@chamabreu
Copy link
Contributor Author

I couldnt find any options in chokidar, that would help on this issue - or i didnt saw them :)

Nice package btw...

@simonhaenisch
Copy link
Owner

Hey thanks and let's turn this into a feature request (: I was under the assumption it would work but no idea, this is the only time I ever implemented a watch mode with chokidar, and it's bin a long while since I did that 😅

@chamabreu
Copy link
Contributor Author

Ok, cool.

I watched already into the source code, maybe I find a solution.

@simonhaenisch
Copy link
Owner

I reviewed this while looking at your PR and yeah it does indeed only watch the file(s) that you pass initially. Changing this is actually not straight-forward because currently it's relying on glob expansion before the file list is passed to the CLI. Not sure it's worth the effort 🤷🏻‍♂️ (also might end up being a breaking change)

@chamabreu
Copy link
Contributor Author

Yes, i understand.

I will develop this feature anyways, because that is a core functionality i am going to need on my server.
I will develop it in my fork, try it to do with less breaking as possible, and maybe you want to merge it then 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants