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
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Suggests:
knitr,
magick,
pkgload (>= 1.3.2.1),
quarto,
rmarkdown,
roxygen2 (>= 7.1.2),
spelling (>= 1.2),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 17 additions & 1 deletion R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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

View check run for this annotation

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

View check run for this annotation

Codecov / codecov/patch

R/create.R#L122

Added line #L122 was not covered by tests

}

#' Create a project from a GitHub repo
#'
#' @description
Expand Down Expand Up @@ -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.

Loading