Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions R/bundle_resources.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' Turn to NULL if you don't want this meta tag to be included.
#' @inheritParams htmltools::htmlDependency
#' @param with_sparkles C'est quand que tu vas mettre des paillettes dans ma vie Kevin?
#' @param activate_js Boolean to enable or disable the injection of JavaScript via activate_js().
#'
#' @importFrom htmltools htmlDependency
#' @export
Expand All @@ -30,7 +31,8 @@ bundle_resources <- function(
package = NULL,
all_files = TRUE,
app_builder = "golem",
with_sparkles = FALSE
with_sparkles = FALSE,
activate_js = TRUE
) {
res <- list()
if (
Expand All @@ -54,9 +56,13 @@ bundle_resources <- function(
as.character(
tags$title(app_title)
),
as.character(
golem::activate_js()
),
{
if (activate_js){
as.character(
golem::activate_js()
)
}
},
head
),
attachment = attachment,
Expand Down
5 changes: 4 additions & 1 deletion man/bundle_resources.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 13 additions & 26 deletions tests/testthat/test-install_dev_deps.R
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
expect_installed <- function(pkg) {
expect(
rlang::is_installed(pkg),
failure_message = paste0(
"Package '", pkg, "' is not installed. Installed from ",
getOption("repos")
)
)
}

test_that("install_dev_deps works", {
withr::with_temp_libpaths({
install_dev_deps(
force_install = TRUE,
repos = "https://cran.rstudio.com"
)

paks <- unique(
c(
"usethis",
"pkgload",
"dockerfiler",
"devtools",
"roxygen2",
"attachment",
"rstudioapi",
"here",
"fs",
"desc",
"pkgbuild",
"processx",
"rsconnect",
"testthat",
"rstudioapi"
)
force_install = TRUE
)
for (
pak in paks
pak in dev_deps
) {
expect_true(
rlang::is_installed(pak)
)
expect_installed(pak)
}
})
})
Expand Down
Loading