Skip to contents

Usage

document_and_reload(
  golem_wd = get_golem_wd(),
  roclets = NULL,
  load_code = NULL,
  clean = FALSE,
  export_all = FALSE,
  helpers = FALSE,
  attach_testthat = FALSE,
  ...,
  pkg
)

Arguments

golem_wd

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

roclets

Character vector of roclets to use.

The default, NULL, uses the roxygen roclets option, which defaults to c("collate", "namespace", "rd"). This will update (if needed) the Collate field with update_collate(), produce the NAMESPACE file with namespace_roclet(), and produce the Rd files with rd_roclet().

(Note that update_collate() is not technically a roclet but is still controlled with this argument for historical reasons.)

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()

pkg

[Deprecated] This argument has been replaced by golem_wd and is kept here for backward compatibility. Providing a value to this argument has no effect: the value is silently ignored, and golem_wd is used instead.

Value

Used for side-effects