% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/infrastructure.R
\name{infrastructure}
\alias{infrastructure}
\alias{use_testthat}
\alias{use_test}
\alias{use_rstudio}
\alias{use_vignette}
\alias{use_rcpp}
\alias{use_travis}
\alias{add_travis}
\alias{use_coverage}
\alias{use_appveyor}
\alias{use_package_doc}
\alias{use_revdep}
\alias{add_travis}
\alias{use_cran_comments}
\alias{add_travis}
\alias{use_code_of_conduct}
\alias{add_travis}
\alias{use_cran_badge}
\alias{use_mit_license}
\alias{use_gpl3_license}
\alias{use_dev_version}
\title{Add useful infrastructure to a package.}
\usage{
use_testthat(pkg = ".")

use_test(name, pkg = ".")

use_rstudio(pkg = ".")

use_vignette(name, pkg = ".")

use_rcpp(pkg = ".")

use_travis(pkg = ".", browse = interactive())

use_coverage(pkg = ".", type = c("codecov", "coveralls"))

use_appveyor(pkg = ".")

use_package_doc(pkg = ".")

use_revdep(pkg = ".")

use_cran_comments(pkg = ".")

use_code_of_conduct(pkg = ".")

use_cran_badge(pkg = ".")

use_mit_license(pkg = ".", copyright_holder = getOption("devtools.name",
  "<Author>"))

use_gpl3_license(pkg = ".")

use_dev_version(pkg = ".")
}
\arguments{
\item{pkg}{package description, can be path or package name. See
\code{\link{as.package}} for more information.}

\item{name}{File name to use for new vignette. Should consist only of
numbers, letters, _ and -. I recommend using lower case.}

\item{browse}{open a browser window to enable Travis builds for the package
automatically.}

\item{type}{CI tool to use. Currently supports codecov and coverall.}

\item{copyright_holder}{The copyright holder for this package. Defaults to
\code{getOption("devtools.name")}.}
}
\description{
Add useful infrastructure to a package.
}
\section{\code{use_testthat}}{

Add testing infrastructure to a package that does not already have it.
This will create \file{tests/testthat.R}, \file{tests/testthat/} and
add \pkg{testthat} to the suggested packages. This is called
automatically from \code{\link{test}} if needed.
}

\section{\code{use_test}}{

Add a test file, also add testing infrastructure if necessary.
This will create \file{tests/testthat/test-<name>.R} with a user-specified
name for the test.  Will fail if the file exists.
}

\section{\code{use_vignette}}{

Adds needed packages to \code{DESCRIPTION}, and creates draft vignette
in \code{vignettes/}. It adds \code{inst/doc} to \code{.gitignore}
so you don't accidentally check in the built vignettes.
}

\section{\code{use_rcpp}}{

Creates \code{src/} and adds needed packages to \code{DESCRIPTION}.
}

\section{\code{use_travis}}{

Add basic travis template to a package. Also adds \code{.travis.yml} to
\code{.Rbuildignore} so it isn't included in the built package.
}

\section{\code{use_coverage}}{

Add test code coverage to basic travis template to a package.
}

\section{\code{use_appveyor}}{

Add basic AppVeyor template to a package. Also adds \code{appveyor.yml} to
\code{.Rbuildignore} so it isn't included in the built package.
}

\section{\code{use_package_doc}}{

Adds a roxygen template for package documentation
}

\section{\code{use_revdep}}{

Add \code{revdep} directory and basic check template.
}

\section{\code{use_cran_comments}}{

Add \code{cran-comments.md} template.
}

\section{\code{use_code_of_conduct}}{

Add a code of conduct to from \url{http://contributor-covenant.org}.
}

\section{\code{use_cran_badge}}{

Add a badge to show CRAN status and version number on the README
}

\section{\code{use_mit_license}}{

Adds the necessary infrastructure to declare your package as
distributed under the MIT license.
}

\section{\code{use_gpl3_license}}{

Adds the necessary infrastructure to declare your package as
distributed under the GPL v3.
}

\section{\code{use_dev_version}}{

This adds ".9000" to the package \code{DESCRIPTION}, adds a new heading to
\code{NEWS.md} (if it exists), and then checks the result into git.
}

\seealso{
Other infrastructure: \code{\link{use_build_ignore}},
  \code{\link{use_data_raw}}, \code{\link{use_data}},
  \code{\link{use_news_md}}, \code{\link{use_package}},
  \code{\link{use_readme_rmd}}
}
