Skip to content

Commit

Permalink
Add RStudio UI for new project from template
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed Sep 11, 2023
1 parent bd95fe1 commit 3d25c1f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/template_project.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
template_project <- function(path, ...) {
# Collect further arguments
dots <- list(...)

# Pass on to bake function
bake(
dots$template,
path,
no_input=dots$no_input,
overwrite=dots$overwrite
)
}
17 changes: 17 additions & 0 deletions inst/rstudio/templates/project/file.dcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Title: Cookiecutter template
Caption: Create a new project from a template
Binding: template_project

Parameter: template
Widget: FileInput
Label: Template

Parameter: no_input
Widget: CheckboxInput
Label: Skip asking for template parameters
Default: Off

Parameter: overwrite
Widget: CheckboxInput
Label: Overwrite existing files
Default: Off

0 comments on commit 3d25c1f

Please sign in to comment.