Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN release #16

Open
DivadNojnarg opened this issue Jul 13, 2021 · 1 comment
Open

CRAN release #16

DivadNojnarg opened this issue Jul 13, 2021 · 1 comment

Comments

@DivadNojnarg
Copy link
Member

cc @schloerke : what do you see missing in terms of features for a CRAN release?

@schloerke
Copy link
Contributor

While I can see the use case for html_2_R only printing to the console, as a developer I would like to have the raw {htmltools} tag objects and skip the hand copy part.

This would allow for something like:

library(magrittr)
library(htmltools)

"<div class='outer'><span class='red'>Red</span></div>" %>%
  html_2_tags() %>%
  tagAppendChild(span(class="green", "Green")) %>%
  as.character()
#> <div class='outer'><span class='red'>Red</span><span class='green'>Green</span></div>

reference_script() should only add a new reference if it does not exist. If it does exit, print message saying you skipped it.

charpente/R/utils.R

Lines 119 to 126 in cb9624b

reference_script <- function(name) {
write(
sprintf("import './%s.js'", name),
file = "./srcjs/main.js",
append = TRUE
)
ui_done("Script successfuly added to JS entry point!")
}


I don't know of more use cases that I ran into.

It was very impressive being able to call build_js() and have it take ~10ms. This should almost be a part of the standard devtools::load_all(), haha. I can not think of a clean way to shim that code in without having it execute for other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants