document_and_reload: Document and reload your package

Description Usage Arguments Value

View source: R/reload.R

Description

This function calls rstudioapi::documentSaveAll(), roxygen2::roxygenise() and pkgload::load_all().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
document_and_reload(
  pkg = get_golem_wd(),
  roclets = NULL,
  load_code = NULL,
  clean = FALSE,
  export_all = FALSE,
  helpers = FALSE,
  attach_testthat = FALSE,
  ...
)

Arguments

pkg

Path to the root of the package. Default is get_golem_wd().

roclets

Character vector of roclet names to use with package. The default, NULL, uses the roxygen roclets option, which defaults to c("collate", "namespace", "rd").

load_code

A function used to load all the R code in the package directory. The default, NULL, uses the strategy defined by the load roxygen option, which defaults to load_pkgload(). See load for more details.

clean

If TRUE, roxygen will delete all files previously created by roxygen before running each roclet.

export_all

If TRUE (the default), export all objects. If FALSE, export only the objects that are listed as exports in the NAMESPACE file.

helpers

if TRUE loads testthat test helpers.

attach_testthat

If TRUE, attach testthat to the search path, which more closely mimics the environment within test files.

...

Other arguments passed to pkgload::load_all()

Value

Used for side-effects


golem documentation built on April 17, 2021, 9:06 a.m.