From 8be05e0a98b5b18713e5bf64145865659bd65bee Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Wed, 22 Jan 2025 15:15:24 +0000 Subject: [PATCH] update precompile vignette script for new figure file paths --- vignettes/precompile.R | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/vignettes/precompile.R b/vignettes/precompile.R index 670918b11..bd8673e42 100644 --- a/vignettes/precompile.R +++ b/vignettes/precompile.R @@ -7,17 +7,14 @@ knitr::knit( ) # run from package root directory -figures <- file.path(list.files(path = "figure", pattern = "^plot-.*\\.png$")) -if (!dir.exists(file.path("vignettes", "figure"))) { - dir.create(file.path("vignettes", "figure")) -} +figures <- file.path(list.files(path = ".", pattern = "^plot-.*\\.png$")) cp <- file.copy( - from = file.path("figure", figures), - to = file.path("vignettes", "figure"), + from = file.path(".", figures), + to = file.path("vignettes", "articles"), overwrite = TRUE ) if (all(cp)) { - unlink(file.path("figure"), recursive = TRUE) + unlink(figures) } else { print("Article figures did not copy, please inspect manually.") }