app_dependencies: Detect an app's package dependencies

View source: R/dependencies.R

app_dependenciesR Documentation

Detect an app's package dependencies

Description

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.

Usage

app_dependencies(appdir, app_type = NULL)

Arguments

appdir

Character string. Path to the app or multi-app suite directory.

app_type

Character string or NULL. "r-shiny" or "py-shiny", or NULL to autodetect from appdir.

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"))

shinyelectron documentation built on Dec. 3, 2026, 9:07 a.m.