#' @export
grab <- function() {
box::use(. / install[install])
init()
install()
}
#' @export
init <- function() {
box::use(
here[here],
jsonlite[write_json, read_json],
glue[glue],
cli[cli_h1, cli_alert, cli_alert_danger, cli_alert_success],
. / util[scalar]
)
module_json <- glue(
"{here()}/package.json"
)
if (!file.exists(module_json)) {
cli_alert(glue("Creating package.json at '{here()}'."))
temp <- list(
name = scalar(""),
author = scalar(""),
version = scalar("")
)
write_json(temp, module_json, pretty = TRUE)
} else {
cli_alert("Init not required, package.json already exists.")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.