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
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 definitions
diagram/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.
The text was updated successfully, but these errors were encountered:
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 repositorymdl serve -dir diagram/views
to build and edit diagrams from the viewsHowever, this means that the file system watch for changes that the current implementation of
mdl serve
sets up only looks atdiagram/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
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.
The text was updated successfully, but these errors were encountered: