Skip to contents

This function sets up a new G6TR Shiny project based on the provided application type and configuration. It uses the Golem framework to create a structured Shiny package and applies the necessary project-specific setup, including handling configuration files, project hooks, and app-specific settings.

Usage

g6tr_shiny_setup(
  project_name = desc::desc_get("Name"),
  description_file = "DESCRIPTION",
  config = NULL,
  open = FALSE,
  overwrite = FALSE
)

Arguments

project_name

Character. Project name.

description_file

Character. Source DESCRIPTION file.

config

A character string specifying the path to the YAML configuration file for the project. If NULL, a blank Golem-based Shiny app is created with a default gradient bs4Dash theme.

open

Logical; if TRUE, the created project will be opened in the current RStudio session.

overwrite

Logical; Should the already existing project be overwritten?

Value

No return value. This function creates a Golem project structure and sets up the necessary files and configuration.

Details

This function reads the YAML configuration file to determine the type of Shiny application being created. Depending on the configuration, it assigns the correct project type and project hook for initializing the app. If no configuration file is provided (config = NULL), it sets up a blank gradient app structure. Additional configuration or hooks for specific app types are handled through the associated project_hook function.

Examples

if (FALSE) g6tr_shiny_setup(config = "path/to/config.yml") # \dontrun{}