Skip to content

Commit

Permalink
improved documentation on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Oct 3, 2013
1 parent e63df9a commit a737992
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 16 deletions.
46 changes: 38 additions & 8 deletions R/deploy.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,49 @@

#' Application Deployment
#' Deploy Applications to ShinyApps
#'
#' Deploy an application to ShinyApps
#' @param appDir Directory containing application source code (defaults to
#' current working directory)
#' Deploy a \link[shiny:shiny-package]{shiny} application to the ShinyApps
#' service.
#' @details Prior to deploying an application you should call the
#' \code{\link{setAccountInfo}} function to register your ShinyApps account on
#' the local system.
#'
#' After the initial deployment of an application from a given \code{appDir},
#' subsequent deployments will automatically use the \code{appName} and
#' \code{account} parameters of the initial deployment (unless overriden
#' explicitly).
#' @param appDir Directory containing application source code. Defaults to
#' current working directory.
#' @param appName Name of application (names must be unique with ShinyApps
#' accounts)
#' accounts). Defaults to the base name of the specified \code{appDir}.
#' @param account ShinyApps account to deploy application to. This parameter is
#' only required for the initial deployment of an application when there are
#' multiple accounts configured on the system.
#' @param launch.browser If true, the system's default web browser will be
#' launched automatically after the app is started. Defaults to true in
#' multiple accounts configured on the system (see \link{accounts}).
#' @param launch.browser If true, the system's default web browser will be
#' launched automatically after the app is started. Defaults to \code{TRUE} in
#' interactive sessions only.
#' @param quiet Request that no status information be printed to the console
#' during the deployment.
#' @examples
#' \dontrun{
#'
#' # deploy the application in the current working dir
#' deploy()
#'
#' # deploy an application in another directory
#' deploy("~/projects/shiny/app1")
#'
#' # deploy using an alternative application name
#' deploy("~/projects/shiny/app1", appName = "myapp")
#'
#' # deploy specifying an explicit account name, then
#' # redeploy with no arguments (will automatically use
#' # the previously specified account)
#' deploy(account = "jsmith")
#' deploy()
#'
#' # deploy but don't launch a browser when completed
#' deploy(launch.browser = FALSE)
#' }
#' @export
deploy <- function(appDir = getwd(),
appName = NULL,
Expand Down
48 changes: 42 additions & 6 deletions man/deploy.Rd
Original file line number Diff line number Diff line change
@@ -1,31 +1,67 @@
\name{deploy}
\alias{deploy}
\title{Application Deployment}
\title{Deploy Applications to ShinyApps}
\usage{
deploy(appDir = getwd(), appName = NULL, account = NULL,
launch.browser = getOption("shinyapps.launch.browser", interactive()),
quiet = FALSE)
}
\arguments{
\item{appDir}{Directory containing application source
code (defaults to current working directory)}
code. Defaults to current working directory.}

\item{appName}{Name of application (names must be unique
with ShinyApps accounts)}
with ShinyApps accounts). Defaults to the base name of
the specified \code{appDir}.}

\item{account}{ShinyApps account to deploy application
to. This parameter is only required for the initial
deployment of an application when there are multiple
accounts configured on the system.}
accounts configured on the system (see \link{accounts}).}

\item{launch.browser}{If true, the system's default web
browser will be launched automatically after the app is
started. Defaults to true in interactive sessions only.}
started. Defaults to \code{TRUE} in interactive sessions
only.}
\item{quiet}{Request that no status information be
printed to the console during the deployment.}
}
\description{
Deploy an application to ShinyApps
Deploy a \link[shiny:shiny-package]{shiny} application to
the ShinyApps service.
}
\details{
Prior to deploying an application you should call the
\code{\link{setAccountInfo}} function to register your
ShinyApps account on the local system.
After the initial deployment of an application from a
given \code{appDir}, subsequent deployments will
automatically use the \code{appName} and \code{account}
parameters of the initial deployment (unless overriden
explicitly).
}
\examples{
\dontrun{
# deploy the application in the current working dir
deploy()
# deploy an application in another directory
deploy("~/projects/shiny/app1")
# deploy using an alternative application name
deploy("~/projects/shiny/app1", appName = "myapp")
# deploy specifying an explicit account name, then
# redeploy with no arguments (will automatically use
# the previously specified account)
deploy(account = "jsmith")
deploy()
# deploy but don't launch a browser when completed
deploy(launch.browser = FALSE)
}
}

3 changes: 1 addition & 2 deletions man/shinyapps-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Maintainer: JJ Allaire <[email protected]>

\keyword{ package }
\seealso{

\code{\link[shiny:shiny-package]{shiny}}
\link[shiny:shiny-package]{shiny}
}

0 comments on commit a737992

Please sign in to comment.