Delegate shinylive deployment to code in shinylive #310
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 makes it so that when
shiny static
is called, it runs code provided by the shinylive bundle. This makes it so that shinylive can make changes to how it does deployment, without having to synchronize it with the shiny package.Along with posit-dev/py-shinylive#14, it also makes the following possible:
Multiple applications can be deployed in one command, with:
This will create the following directory structure:
All of the deployed apps share the same shinylive resources.
Note that if you want one to be deployed to the top level, it can be done by just not using
--subdir
:shiny static
now by default only includes packages needed to run the deployed application(s). Previously, a deployment would be about 200MB because it included all of the packages from Pyodide, as well as a few other shiny-related packages. With the change in posit-dev/py-shinylive#14, a minimal shinylive app deployment is now about 27MB.If deployed this way, then when a user goes to the
/edit/
page and makes changes or runs code in the terminal, they will not be able to load any extra packages that normally are part of the distribution (they will be able to load packages from PyPI, but as always, these packages must not contained any compiled code).In order to include the full Shinylive distribution, the option
--full-shinylive
can be used.