-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RStudio UI for new project from template
- Loading branch information
1 parent
bd95fe1
commit 3d25c1f
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |