-
Notifications
You must be signed in to change notification settings - Fork 22
Description
A pattern that we're using for sharing the design objects between different repositories without also sharing the views is to use the following pattern:
diagram/model.go
contains all of the design object definitionsdiagram/views/views.go
contains the views specific to the repository- Run
mdl serve -dir diagram/views
to build and edit diagrams from the views
However, this means that the file system watch for changes that the current implementation of mdl serve
sets up only looks at diagram/views
and any subdirectories, so design object changes are not noticed and neither the livereload or a page refresh of the editor will bring in those changes.
One solution would be to invert the pattern so that the views live in the shallower directory while the design objects move down to a deeper directory:
diagram/views.go
diagram/model/model.go
- Run
mdl serve -dir diagram
But, I'm also wondering if we might want to allow for more flexibility by either allowing the specification of extra directories to watch or looking at the package imports and watching the directories that are found from them that are also in the same Go module.