Scans a Shiny app's source for the R or Python packages it uses, with the
same detection shinyelectron applies at build time. This is useful before a
shinylive build, in CI especially, because shinylive::export() compiles the
WebAssembly bundle from the packages installed in the current session, so an
app's dependencies must be installed before conversion.
Value
Character vector of detected package names, excluding base R packages (for R) or the Python standard library (for Python).
Examples
# Detect the packages a bundled example app uses
app_dependencies(example_app("r"))
#> [1] "bslib" "shiny"
if (FALSE) { # \dontrun{
# Install an app's dependencies before a shinylive build
pkgs <- app_dependencies("path/to/app")
install.packages(pkgs)
} # }