Bulma study case: Install Bulma dependencies

  1. Define the source to get dependencies:
Locally (recommend) Connecting to content delivery network (CDN)
create_dependency(
  "bulma",
  tag = "0.9.3"
)
create_dependency(
  "bulma",
  tag = "0.9.3",
  options = charpente_options(local = FALSE)
)
add_bulma_deps <- function(tag) {
 bulma_deps <- htmlDependency(
  name = "bulma",
  version = "0.9.3",
  src = c(file = "bulma-0.9.3"),
  stylesheet = "css/bulma.min.css",
  package = "mypkg",
 )
 tagList(tag, bulma_deps)
}
add_bulma_deps <- function(tag) {
 bulma_deps <- htmlDependency(
  name = "bulma",
  version = "0.9.3",
  src = c(href = "https://cdn.jsdelivr.net/npm/bulma@0.9.3/"),
  stylesheet = "css/bulma.min.css"
 )
 tagList(tag, bulma_deps)
}

Note: The current version of the package only has the local argument in the charpente_options

charpente_options <- function(local = TRUE) {
  list(local = local)
}