소스 검색

Reload current theme on make if Sassy

base16
Garrick Aden-Buie 7 년 전
부모
커밋
e2d3589916
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. +9
    -2
      make.R

+ 9
- 2
make.R 파일 보기

@@ -16,8 +16,15 @@ cli_alert_info("Compiling themes...")
dir_ls("src", regexp = "^[^_].+\\.scss") %>%
walk(render_sass)

cli_alert_info('Installing themes to {path {path_home_r(".R", "rstudio", "themes")}}')
cli_alert_success('Installing themes to {path {path_home_r(".R", "rstudio", "themes")}}')
dir_ls("dist", regexp = "\\.rstheme") %>%
walk(cp_to_rstudio)

cli_alert_success("Use {code {fun rstudioapi::applyTheme}} to enable the above themes")
current_theme <- rstudioapi::getThemeInfo()$editor
if (current_theme %in% list_sassy_themes()) {
cli_alert_success("Reloading {strong {current_theme}}")
rstudioapi::applyTheme(current_theme)
} else {
cli_alert_info("Use {code {fun list_sassy_themes}} to list Sassy RStudio themes")
cli_alert_info("Use {code {fun rstudioapi::applyTheme}} to enable the above themes")
}

Loading…
취소
저장