Skip to contents

Performs routine package maintenance:

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 the package root directory.

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 progress messages be displayed in the console?

precompute

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

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

NULL, invisibly, after updating the package. Emits progress messages when verbose = TRUE.

Details

This function checks URLs, regenerates roxygen2 documentation and rebuilds the README. It also applies the tidyverse style to DESCRIPTION and package code and writes package metadata to 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
# }