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

Use rmarkdown::draft #572

Closed
hadley opened this Issue Sep 1, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@hadley
Member

hadley commented Sep 1, 2014

use_vignette <- function(name, pkg = ".") {
  pkg <- as.package(pkg)

  add_desc_package(pkg, "Suggests", "knitr")
  add_desc_package(pkg, "VignetteBuilder", "knitr")
  dir.create(file.path(pkg$path, "vignettes"), showWarnings = FALSE)

  path <- file.path(pkg$path, "vignettes", paste0(name, ".Rmd"))
  rmarkdown::draft(path, "html_vignette", "rmarkdown", 
    create_dir = FALSE, edit = FALSE)

  message("Draft vignette created in ", path)
}

Needs an Rmarkdown dependency, so will delay devtools release.

@hadley hadley closed this in f8c1ece Sep 2, 2014

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.