Explorar el Código

report theme name when installing

one
Garrick Aden-Buie hace 7 años
padre
commit
6b8fab30fb
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  1. +10
    -1
      make.R

+ 10
- 1
make.R Ver fichero

dir_ls("src", regexp = "^[^_].+\\.scss") %>% dir_ls("src", regexp = "^[^_].+\\.scss") %>%
walk(render_sass) walk(render_sass)


get_theme_name <- function(file) {
x <- readLines(file, warn = FALSE)
x <- grep("rs-theme-name", x, value = TRUE)
if (!length(x)) return("")
x <- sub("^\\s*/\\*\\s*rs-theme-name:\\s", "", x)
x <- sub("\\s*\\*/\\s*$", "", x)
x
}

cp_to_rstudio <- function(file) { cp_to_rstudio <- function(file) {
cli_alert("{path {path_file(file)}}")
cli_alert("{emph {get_theme_name(file)}}")
file_copy( file_copy(
file, file,
path_home_r(".R", "rstudio", "themes", path_file(file)), path_home_r(".R", "rstudio", "themes", path_file(file)),

Cargando…
Cancelar
Guardar