Add dev_mode
param to App()
#1297
Closed
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.
This PR does a few things:
App(dev_mode=True)
.App
object is created, ifdev_mode
isNone
(the default), then it looks at the env varSHINY_DEV_MODE
. The setting fordev_mode
is stored in theApp
object.shiny_deps()
was called. This is potentially problematic when running multiple concurrent apps, as with shinylive apps embedded in a web page. With the change, theApp
object stores the value ofdev_mode
, so the setting for oneApp
will not affect any others.The reason for this PR is for Shinylive -- I want to enable the dev mode error console when there's are both editor and viewer components, but not when there's just the viewer component.