ソースを参照

report theme name when installing

one
コミット
6b8fab30fb
1個のファイルの変更10行の追加1行の削除
  1. +10
    -1
      make.R

+ 10
- 1
make.R ファイルの表示

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)),

読み込み中…
キャンセル
保存