diff --git a/Makefile b/Makefile index 0cd42464..6f16dcd4 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ clean: vignettes: (cd docs; remake install_vignettes) -staticdocs: +staticdocs: vignettes @mkdir -p inst/staticdocs Rscript -e "library(methods); staticdocs::build_site()" rm -f vignettes/*.html diff --git a/docs/R/vignettes.R b/docs/R/vignettes.R index ad987781..f52bd0d5 100644 --- a/docs/R/vignettes.R +++ b/docs/R/vignettes.R @@ -26,10 +26,9 @@ build_vignettes <- function(cleanup=FALSE) { copy <- c("figures", "figure", "mee.bst", "suppmat.sty", "refs.bib", "growth_model_pars_core.tex", "growth_model_pars_hyper.tex") - if (cleanup) { - unlink(file.path(dest, copy), recursive=TRUE) - } else { - file.copy(copy, dest, recursive=TRUE) + unlink(file.path(dest, copy), recursive=TRUE) + if (!cleanup) { + file.copy(copy, dest, recursive=TRUE, overwrite=TRUE) devtools::build_vignettes() } } diff --git a/docs/remake.yml b/docs/remake.yml index 3b9c8968..b90db9e5 100644 --- a/docs/remake.yml +++ b/docs/remake.yml @@ -157,9 +157,9 @@ targets: - ./suppmat.sty vignettes/demography.Rnw: - command: file.copy("demography.tex", target_name) + command: file.copy("demography.tex", target_name, overwrite=TRUE) vignettes/physiology.Rnw: - command: file.copy("physiology.tex", target_name) + command: file.copy("physiology.tex", target_name, overwrite=TRUE) vignettes/plant.Rmd: command: patch_md("plant.md", target_name) vignettes/equilibrium.Rmd: