File: compile_component_sass.R

package info (click to toggle)
r-cran-bslib 0.9.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,412 kB
  • sloc: javascript: 13,349; makefile: 33; sh: 23
file content (12 lines) | stat: -rw-r--r-- 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
if (!identical(getwd(), rprojroot::find_package_root_file())) {
  stop("This script must be run from the top directory of the bslib package")
}

pkgload::load_all()

# TODO: save a CSS file for every version >= 5?
dep <- component_dependency_sass_(bs_theme())
css <- file.path(dep$src, dep$stylesheet)
target_dir <- path_inst("components", "dist")
target_css <- file.path(target_dir, "components.css")
file.copy(css, target_css, overwrite = TRUE)