Initiate your package and share it on GitHub
# Describe your project
fusen::fill_description(
pkg = here::here(),
fields = list(
Title = "Share Your Project Following Good Development Practices From a Rmarkdown File",
Description = "Use Rmarkdown First method. Strengthen your work with documentation and tests. Everything can be set from a Rmarkdown file in your project.",
`Authors@R` = c(
person("John", "Doe", email = "john@email.me", role = c("aut", "cre"), comment = c(ORCID = "0000-0000-0000-0000"))
)
)
)
# Define License with use_*_license()
usethis::use_mit_license("John Doe")
- Open the “dev/flat_full.Rmd”
- This is the skeleton to follow if you want a properly documented and tested work
- Write what the code is supposed to do in plain markdown
- Separate the
function
from the example
and test
chunks
- Create new sections below in your flat template with the Addin > add {fusen} chunk
- Then
inflate()
the flat template to build the proper structure of the project
- Sections will be transferred in the correct places to get a proper package
- A set of checks will be run to verify that your work is properly documented and tested
fusen::inflate(flat_file = "dev/flat_full.Rmd", vignette_name = "Get started")
- Share your work on a website using GitHub
- You may need to run
usethis::create_github_token()
, then gitcreds::gitcreds_set()
before, if you do not have a registered GitHub token yet.
- You will be asked multiple times if you want to commit, you can say “yes” each time.
#' \dontrun{
#' # This modifies the current directory and send it on GitHub
init_share_on_github()
#' }
In a few minutes, you’ll be able to see and share your project website.
You won’t have to run this command line again. Each time you push new commits to the main branch on GitHub, your website will be updated thanks to GitHub Actions.