Converts a regular Shiny application directory into a shinylive application that can run entirely in the browser without requiring an R server.
Usage
convert_shiny_to_shinylive(
appdir,
output_dir,
subdir = NULL,
overwrite = FALSE,
verbose = TRUE
)Arguments
- appdir
Character string. Path to the directory containing the Shiny application.
- output_dir
Character string. Path where the converted shinylive app will be saved.
- subdir
Character or NULL. When set, the app is exported into a
<subdir>subdirectory ofoutput_diras an additive shared-site export: existing contents ofoutput_dir(including a sharedshinylive/asset tree) are preserved. When NULL (default), a single-app export is performed and an existingoutput_diris removed whenoverwrite = TRUE.- overwrite
Logical. Whether to overwrite existing output directory. Default is FALSE.
- verbose
Logical. Whether to display detailed progress information. Default is TRUE.
Details
This function converts a Shiny application to shinylive format, which allows the application to run entirely in the browser using WebR. The conversion process:
Validates the input Shiny application structure
Converts R code to be compatible with WebR
Creates necessary shinylive configuration files
Packages the application for browser execution