From 67fcebd6ce77727926b9373f0f62910314cde5c2 Mon Sep 17 00:00:00 2001 From: Howard Baek <50791792+howardbaek@users.noreply.github.com> Date: Mon, 13 May 2024 14:51:16 -0700 Subject: [PATCH] Document function and change title of 'New Project Wizard' to "Quarto-Based OTTR Course" --- R/setup_project.R | 15 +++++++++++++-- .../project/rstudio_project_template.dcf | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/R/setup_project.R b/R/setup_project.R index 8519981..e4f19f9 100644 --- a/R/setup_project.R +++ b/R/setup_project.R @@ -1,4 +1,15 @@ -setup_project <- function(path, ...) { +#' Template Function to Initiate a New Quarto-Based OTTR Course +#' +#' This function will be invoked by RStudio to create a new RStudio Project +#' containing boilerplates files required to start a new Quarto-based OTTR course. +#' +#' For more details, refer to the RStudio Project Templates link: +#' https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html +#' +#' @param path Path to newly created project +#' @param ... User inputs +#' @noRd +setup_project_quarto <- function(path, ...) { # collect inputs dots <- list(...) @@ -49,7 +60,7 @@ setup_project <- function(path, ...) { lapply(boilerplate_file_gha, copy_files, dots$style_set, path) } -# Function to copy each file +# Utility function to copy each file copy_files <- function(file_name, style_set, project_path) { if (style_set == "FHDaSL") { style_set <- "fhdasl" diff --git a/inst/rstudio/templates/project/rstudio_project_template.dcf b/inst/rstudio/templates/project/rstudio_project_template.dcf index 39e66d1..53e6c98 100644 --- a/inst/rstudio/templates/project/rstudio_project_template.dcf +++ b/inst/rstudio/templates/project/rstudio_project_template.dcf @@ -1,5 +1,5 @@ -Binding: setup_project -Title: OTTR Course +Binding: setup_project_quarto +Title: Quarto-Based OTTR Course Icon: logo.png Parameter: style_set