Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

31 lines
901B

  1. #! /usr/bin/env Rscript
  2. library(sass)
  3. library(fs)
  4. library(purrr)
  5. library(cliapp)
  6. source("R/make_functions.R")
  7. dir_create("dist")
  8. cli_alert_info("Prepping base16 themes...")
  9. dir_ls("src/palettes/base16/", regexp = "_base16.+scss") %>%
  10. walk(make_base16_theme)
  11. cli_alert_info("Compiling themes...")
  12. dir_ls("src", regexp = "^[^_].+\\.scss") %>%
  13. walk(render_sass)
  14. cli_alert_success('Installing themes to {path {path_home_r(".R", "rstudio", "themes")}}')
  15. dir_ls("dist", regexp = "\\.rstheme") %>%
  16. walk(cp_to_rstudio)
  17. current_theme <- rstudioapi::getThemeInfo()$editor
  18. if (current_theme %in% list_sassy_themes()) {
  19. cli_alert_success("Reloading {strong {current_theme}}")
  20. rstudioapi::applyTheme(current_theme)
  21. } else {
  22. cli_alert_info("Use {code {fun list_sassy_themes}} to list Sassy RStudio themes")
  23. cli_alert_info("Use {code {fun rstudioapi::applyTheme}} to enable the above themes")
  24. }