-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Watching of serve command doesn't seem to be recursive #15
Comments
This is a bug. The recursive watching of source markdown files ( I am unable to reproduce locally (node v 12.16.0 / macOS). What is your node version / OS? Apparently there are issues with I am not sure if it will actually be fixed anytime soon or if lower versions of node will solve the issue, as this seems to be a caveat of node's own I'll keep this issue open to monitor the situation with P.S. @mnn in the meantime you can actually add your work-around in // .codedoc/watch.ts
import { exec, spawn } from 'child_process';
import { config } from './config';
const cmd = 'find';
const params = `${config.src.base} | entr -r ts-node .codedoc/serve`;
// ... (Though you would need to test to ensure this works). |
I am using Linux 64b (Manjaro) and node 13.12.0. Oh yes, multiplatform file watching is rather problematic. This is not a first time I hit similar issue, most likely caused by the same underlying cause. Thank you very much for the tip, it lead me to this (a bit convoluted) solution: const cmd = 'find';
const params = `${config.src.base} | entr -r npx --no-install ts-node -P .codedoc/tsconfig.json .codedoc/serve`; |
thats a nice work-around. unfortunately, if this drags out long, I will add your solution to the boilerplate repo so that new repositories will use |
as part of this commit, this also should be fixed. the fix is deployed via the combination of npm i -g @codedoc/cli@latest
codedoc update latest in this update, tiered watching is used, and markdown files are now watched using @mnn since I do not have a Linux machine for testing, I am going to keep this issue open for now until you confirm this update fixes the recursive watching issue. |
Sorry, don't have much free time now. Just quickly tested it on a fresh project (same directory structure as my original project), and change detection is working now 🙂. Thank you very much. |
thank you for testing, and that was still pretty fast! |
I am not sure if it is a bug (if recursive watching is intended to work), but I believe such feature would be useful.
when I run
codedoc serve
, it doesn't pickup changes indocs/md/api/index.md
(it detects changes indocs/md/index.md
correctly).It's possible I have it misconfigured, my
config.ts
(which works forserve
andbuild
, meaning it compiles and paths are correct):I don't think I changed any other file (except
index.tsx
incontent
, but that should not be related, just the hamburger being opened by default).If anyone encounters similar issue, here is my current workaround:
find docs/md | entr -r codedoc serve
The text was updated successfully, but these errors were encountered: