Automatic Files Reload for Use With External Editors
Problem to solve
I did not see another issue for this, and my changes are not reloaded when using an external editor. I'm assuming this is a new request.
Currently the only way to refresh the content that the GitBuilding server is serving is by using the built-in editor or restarting the server. It would be nice if the content was reloaded automatically.
Oftentimes a server will watch for file changes and then reload the pages automatically so that it is always serving the latest content. This allows the server to work with an external editor. This does not seem to be the case with
gitbuilding serve. If I edit the docs from the built-in GitBuilding editor the update is triggered. Maybe the intention is to encourage users to use the built-in editor, especially since BuildUp has some non-standard markdown syntax? In any case, there is no way to edit a part file like Part.yaml in GitBuilding's editor, and so the server won't pick up those changes. It requires a server restart whenever a yaml file is edited.
Who will benefit
The end users of GitBuilding will be the ones to benefit.
File watchers can be a little tricky to implement because different editors handle file updates differently. We have run into this with a few of the CadQuery IDE projects. If there are problems implementing this feature I can share some of the lessons we've learned over the years. I can link to code showing how CQ-editor's file system watcher works, and I've got a couple of other projects that might have examples in them to. Just let me know if that would be helpful.
There is a filesystem watcher package available for Python, but those solutions can have platform specific quirks, especially on Windows. https://pypi.org/project/fs-watcher/
The other option is to do manual polling, but I personally like to leave polling as a last resort.
Version of GitBuilding you use
- Version: 0.8.4