You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our file watcher only handles change events. This means that a command such as git checkout docs/index.md which generates a rename event is ignored, and then the file watcher becomes detached from the file and no longer reports any changes.
@mbostock What is the desired behavior in the event of an actual rename?
E.g. mv docs/javascript.md docs/javascript-foo.md. If at /javascript, would you expect the page to reload and stay at the same URL (which would now 404), or would you expect a redirect to the new URL? The trivial solution would be to emit a reload, though it might be nice to location.assign (or location.replace?) to the new URL
@prichey I’d start by making the git checkout use case described above function as intended. I’m not sure we need to support pages getting renamed and redirecting.
Currently our file watcher only handles change events. This means that a command such as
git checkout docs/index.md
which generates a rename event is ignored, and then the file watcher becomes detached from the file and no longer reports any changes.https://github.com/observablehq/cli/blob/0081db4f685ef635df42d0725ec2bbac5e87fa6c/src/preview.ts#L142
The text was updated successfully, but these errors were encountered: