Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple feature request: add option "clean" (and "upgrade"?) to build_vignettes #1770

Closed
courtiol opened this issue Apr 19, 2018 · 3 comments
Closed
Labels
feature a feature request or enhancement vignettes 📜
Milestone

Comments

@courtiol
Copy link

Hi all,
build_vignettes() is great but for some utilisation, it is a little frustrating to see the knitr cash removed after building vignettes that take hours to be processed. It would be great and easy to offer this option.

Proposition:

build_vignettes <- function(pkg = ".",
                            dependencies = "VignetteBuilder",
                            clean = FALSE,  ## new
                            quiet = TRUE
                            ) {
  pkg <- as.package(pkg)
  vigns <- tools::pkgVignettes(dir = pkg$path)
  if (length(vigns$docs) == 0) return()

  install_deps(pkg, dependencies, upgrade = FALSE)

  message("Building ", pkg$package, " vignettes")
  tools::buildVignettes(dir = pkg$path, clean = clean, tangle = TRUE, quiet = quiet)  ## clean added
  copy_vignettes(pkg)

  invisible(TRUE)
}

and since we are at it a boolean argument "upgrade" to pass to the function install_deps() could be nice.

I implement that with the documentation and send a pull request, but I wanted to probe the terrain first.
++

Alex

@jimhester
Copy link
Member

I don't think we need to expose upgrade, but sure we can add clean.

@courtiol
Copy link
Author

That would be great, thank you!

@jimhester jimhester added the feature a feature request or enhancement label May 4, 2018
@jimhester jimhester added this to the 2.0.0 milestone Jul 18, 2018
@lock
Copy link

lock bot commented Jan 14, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 14, 2019
HughParsonage pushed a commit to HughParsonage/devtools that referenced this issue Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement vignettes 📜
Projects
None yet
Development

No branches or pull requests

2 participants