Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
This PR adds support for automatic starting of dev servers when using multiple spas.
While implementing necessary changes, it only made sense to me to make some refactoring and change a design a little, otherwise it felt a little disparate.
Interface of the package remained the same, there are however four
[Obsolete]
methods (one does nothing now, and three others became just a 'proxy' to another methods).Major changes are:
SpaProxyLaunchManager<T> : IDisposable where T : SpaDevelopmentServerOptions
which allows to register multiple instances with DIFor the scenario with multiple spa, there's now two options:
Old option with manual start:
Another option with autostart:
This approach potentially leaves a little bit of garbage in prod deployment in the form of
DevServerOptionsOne
andDevServerOptionsTwo
which will not be used anywhere, I`m not sure if they can be optimized out in release build. Can be worked around with conditional compilation, though.I also added 4th sample app for Multi Spa with autostart (90% of the changes in this PR), which is almost a copy of original multi spa sample with manual start, except for small details.
Please let me know what you think about this feature. If you have any suggestion on how this can be improved, I'd be glad to discuss and make necessary changes.