R/include_css_js.R

Defines functions include_css_files

Documented in include_css_files

#' Include `CSS` files from `/inst/css/` package directory to application header
#'
#' `system.file` should not be used to access files in other packages, it does
#' not work with `devtools`.
#' As a result, this method is individually redefined as required in each package.
#' Therefore, this function is not exported.
#'
#' @param pattern (`character`) pattern of files to be included.
#'
#' @return HTML code that includes `CSS` files.
#'
#' @keywords internal
#'
include_css_files <- function(pattern = "*") {
  css_files <- list.files(
    system.file("css", package = "teal.transform", mustWork = TRUE),
    pattern = pattern, full.names = TRUE
  )
  singleton(lapply(css_files, includeCSS))
}

Try the teal.transform package in your browser

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

teal.transform documentation built on May 29, 2024, 5:06 a.m.