R/build.R

Defines functions build_package

#' @importFrom pkgbuild build
#' @importFrom utils modifyList

build_package <- function(path, build_args = list()) {
  default_args <- list(
    path = path, dest_path = NULL, binary = FALSE, vignettes = TRUE,
    manual = TRUE, args = NULL, quiet = TRUE
  )
  args <- modifyList(default_args, build_args)
  zip_path <- system.file(package = "zip", "bin", .Platform$r_arch)
  withr_with_path(zip_path, do.call(build, args))
}

Try the pkgdepends package in your browser

Any scripts or data that you put into this service are public.

pkgdepends documentation built on Nov. 10, 2023, 5:06 p.m.