R/skeleton.R

Defines functions thesisdown_skeleton thesisdown_file

# from https://github.com/rstudio/bookdown/blob/master/R/utils.R
thesisdown_file <- function(...) {
  system.file(..., package = 'thesisdown', mustWork = TRUE)
}

# from https://github.com/rstudio/bookdown/blob/master/R/skeleton.R
thesisdown_skeleton <- function(path = getwd()) {

  # ensure directory exists
#  dir.create(path, recursive = TRUE, showWarnings = FALSE)

  # copy 'resources' folder to path
  resources <- thesisdown_file('rstudio', 'templates', 'project', 'resources')

  R.utils::copyDirectory(from = resources,
                         to = path,
                         recursive = TRUE)
}
ismayc/thesisdown documentation built on April 2, 2024, 8:15 p.m.