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

Add quarto::quarto_create_project #2045

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add quarto::quarto_create_project
  • Loading branch information
focardozom committed Aug 15, 2024
commit 68d9aa5169cae568f25c52d7f6dd1f0b7d44a9c6
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ Suggests:
knitr,
magick,
pkgload (>= 1.3.2.1),
quarto,
rmarkdown,
roxygen2 (>= 7.1.2),
spelling (>= 1.2),
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ export(create_from_github)
export(create_github_token)
export(create_package)
export(create_project)
export(create_quarto_project)
export(create_tidy_package)
export(edit_file)
export(edit_git_config)
18 changes: 17 additions & 1 deletion R/create.R
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
#' * `create_package()` creates an R package
#' * `create_project()` creates a non-package project, i.e. a data analysis
#' project
#' * `create_quarto_project()` creates a Quarto project
#'
#' Both functions can be called on an existing project; you will be asked before
#' any existing files are changed.
@@ -28,7 +29,8 @@
#' * If using RStudio desktop, the package is opened in a new session.
#' * If on RStudio server, the current RStudio project is activated.
#' * Otherwise, the working directory and active project is changed.
#'
#' @param ... pass quarto_create_project aditional arguments.
#' @param name name for quarto project folder
#' @return Path to the newly created project or package, invisibly.
#' @seealso [create_tidy_package()] is a convenience function that extends
#' `create_package()` by immediately applying as many of the tidyverse
@@ -109,6 +111,18 @@
invisible(proj_get())
}



#' @rdname create_package
#' @export
create_quarto_project <- function(name, ...) {

rlang::check_installed("quarto", reason = "to use `quarto_create_project()`")

Check warning on line 120 in R/create.R

Codecov / codecov/patch

R/create.R#L120

Added line #L120 was not covered by tests

quarto::quarto_create_project(name = name, ...)

Check warning on line 122 in R/create.R

Codecov / codecov/patch

R/create.R#L122

Added line #L122 was not covered by tests

}

#' Create a project from a GitHub repo
#'
#' @description
@@ -380,3 +394,5 @@
}
invisible()
}


8 changes: 8 additions & 0 deletions man/create_package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.