Skip to contents

Run routine checks on the package:

Usage

update_docs(
  pkg = ".",
  url_update = TRUE,
  create_codemeta = TRUE,
  create_cff = TRUE,
  build_readme = TRUE,
  verbose = TRUE,
  precompute = TRUE,
  opt_imgs = TRUE,
  opt_dir = c("man/figures", "vignettes"),
  opt_ext = "png$|jpg$",
  opt_overwrite = TRUE,
  add_contributors = TRUE,
  ...
)

Arguments

pkg

Path to a (subdirectory of an) R package.

url_update

A logical value. Should URLs be updated with urlchecker::url_update()?

create_codemeta

A logical value. Should codemeta.json be created with codemetar::write_codemeta()?

create_cff

A logical value. Should CITATION.cff be created with cffr::cff_write()?

build_readme

A logical value. Should README.qmd, README.Rmd or pkgdown index files be built?

verbose

A logical value. Should informative messages be displayed on the console?

precompute

A logical value. Should vignettes be detected and precomputed? See also precompute_vignette().

opt_imgs

A logical value. Should images be optimized with resmush::resmush_dir()?

opt_dir, opt_ext, opt_overwrite

Options passed to the dir, ext and overwrite arguments of resmush::resmush_dir().

add_contributors

Deprecated.

...

Additional arguments passed to downstream functions.

Value

Invisibly returns NULL. When verbose = TRUE, it emits progress messages.

Details

This function updates and cleans the package using a mix of best practices, such as checking URLs, roxygenizing and rebuilding the README. It also applies discretionary practices such as the tidyverse approach for the DESCRIPTION file, overall code style and codemeta.json.

See also

Package maintenance helpers: add_global_gitgnore()

Examples

# \dontrun{
update_docs()
#>  Updating root .gitignore.
#> Warning: cannot open file '.gitignore': No such file or directory
#> Error in file(con, "r"): cannot open the connection
# }