R/dependencies.R

Defines functions html_dependency_capture

Documented in html_dependency_capture

#' HTML dependencies used by capture
#' 
#' @param type Type of dependency to use.
#'
#' @return an [htmltools::htmlDependency()].
#' @export
#'
#' @importFrom utils packageVersion
#' @importFrom htmltools htmlDependency
#'
#' @name html-dependencies
#'
html_dependency_capture <- function(type = c("image", "pdf", "lookbook")) {
  type <- match.arg(type)
  htmlDependency(
    name = "capture",
    version = "0.1.0",
    src = list(file = "packer"),
    package = "capture",
    script = sprintf("capture-%s.js", type)
  )
}
dreamRs/capture documentation built on Oct. 29, 2024, 9:43 p.m.