init {rhino} | R Documentation |
Create Rhino application
Description
Generates the file structure of a Rhino application. Can be used to start a fresh project or to migrate an existing Shiny application created without Rhino.
Usage
init(
dir = ".",
github_actions_ci = TRUE,
rhino_version = "rhino",
force = FALSE
)
Arguments
dir |
Name of the directory to create application in. |
github_actions_ci |
Should the GitHub Actions CI be added? |
rhino_version |
When using an existing |
force |
Boolean; force initialization? By default, Rhino will refuse to initialize a project in the home directory. |
Details
The recommended steps for migrating an existing Shiny application to Rhino:
Put all app files in the
app
directory, so that it can be run withshiny::shinyAppDir("app")
(assuming all dependencies are installed).If you have a list of dependencies in form of
library()
calls, put them in thedependencies.R
file. If this file does not exist, Rhino will generate it based onrenv::dependencies("app")
.If your project uses
{renv}
, putrenv.lock
andrenv
directory in the project root. Rhino will try to only add the necessary dependencies to your lockfile.Run
rhino::init()
in the project root.
Value
None. This function is called for side effects.