with_demo_project | R Documentation |
Run code in temporary project
with_demo_project(code, dir = NULL, news = TRUE, quiet = FALSE)
code |
Code to run with temporary active project |
dir |
Directory within which to create the mock package folder. |
news |
If TRUE, create a NEWS.md file. |
quiet |
Whether to show messages from usethis |
None
with_demo_project({
# Add a new R file.
usethis::use_r("cool-function", open = FALSE)
# Pretend we added useful code inside it.
# Track the new R file with Git.
gert::git_add("R/cool-function.R")
gert::git_commit("- Add cool function.")
# Bump version with fledge.
fledge::bump_version()
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.