You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
383B

  1. library(sass)
  2. library(fs)
  3. library(purrr)
  4. render_sass <- function(file, output = NULL, outdir = "rsthemes") {
  5. if (is.null(output)) {
  6. output <- file
  7. path_ext(output) <- "rstheme"
  8. }
  9. output <- path(outdir, output)
  10. out_sass <- sass(sass_file(paste(file)))
  11. writeLines(out_sass, output)
  12. }
  13. dir_create("rsthemes")
  14. dir_ls(regexp = "^[^_].+\\.scss") %>%
  15. walk(render_sass)