install.packages(c('devtools', 'pkgdown', 'styler', 'lintr', 'pak')) # install dev dependencies
pak::pkg_install(".") # install package and dependencies
styler::style_pkg() # format code
lintr::lint_package() # lint code
devtools::check() # run R CMD check, which runs everything below
devtools::document() # generate package meta data and man files
devtools::test() # test package
devtools::build_vignettes() # build vignettes only
devtools::run_examples() # run doc examples
devtools::check(vignettes = FALSE) # check package without vignettes
Our CI builds two version of the documentation:
main
branch anddev
branch.Commands for developing the documentation site:
# Basic build and preview
R -e 'pkgdown::clean_site()'
R -e 'devtools::document()'
R -e 'pkgdown::build_site()'
# A smart rebuild workflow for non-RStudio users.
# You may need to first build the site.
R -e 'pkgdown::build_site(".", examples = FALSE, devel = TRUE, preview = FALSE)'
R -e 'renv::install("servr")'
# Will start a local docs server and monitor for changes.
Rscript inst/pkgdown-watch.R
Please follow the guidelines in the PR template document.
Open a release issue and then copy and follow this checklist in the issue (modified from the checklist generated by usethis::use_release_issue(version = "1.0.2")
):
git pull
on dev
branch.devtools::check(".", manual = TRUE, env_vars = c(NOT_CRAN = "false"))
.git checkout main
git pull
urlchecker::url_check()
.devtools::build_readme()
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
.cran-comments.md
dev
and run through the list again.Submit to CRAN:
devtools::submit_cran()
.Wait for CRAN...
main
back to dev
.usethis::use_github_release(publish = FALSE)
(publish off, otherwise it won't push) will create a draft release based on the commit hash in CRAN-SUBMISSION and push a tag to the GitHub repo.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.