|
10 | 10 | ## usethis namespace: end |
11 | 11 | NULL |
12 | 12 |
|
| 13 | +#' Options consulted by usethis |
| 14 | +#' |
| 15 | +#' @description |
| 16 | +#' User-configurable options consulted by usethis, which provide a mechanism |
| 17 | +#' for setting default behaviours for various functions. |
| 18 | +#' |
| 19 | +#' If the built-in defaults don't suit you, set one or more of these options. |
| 20 | +#' Typically, this is done in the `.Rprofile` startup file, which you can open |
| 21 | +#' for editing with [edit_r_profile()] - this will set the specified options for |
| 22 | +#' all future R sessions. Your code will look something like: |
| 23 | +#' |
| 24 | +#' ``` |
| 25 | +#' options( |
| 26 | +#' usethis.description = list( |
| 27 | +#' "Authors@R" = utils::person( |
| 28 | +#' "Jane", "Doe", |
| 29 | + |
| 30 | +#' role = c("aut", "cre"), |
| 31 | +#' comment = c(ORCID = "YOUR-ORCID-ID") |
| 32 | +#' ), |
| 33 | +#' License = "MIT + file LICENSE" |
| 34 | +#' ), |
| 35 | +#' usethis.destdir = "/path/to/folder/", # for use_course(), create_from_github() |
| 36 | +#' usethis.protocol = "ssh", # Use ssh git protocol |
| 37 | +#' usethis.overwrite = TRUE # overwrite files in Git repos without confirmation |
| 38 | +#' ) |
| 39 | +#' ``` |
| 40 | +#' |
| 41 | +#' @section Options for the usethis package: |
| 42 | +#' |
| 43 | +#' - `usethis.description`: customize the default content of new `DESCRIPTION` |
| 44 | +#' files by setting this option to a named list. |
| 45 | +#' If you are a frequent package developer, it is worthwhile to pre-configure |
| 46 | +#' your preferred name, email, license, etc. See the example above and the |
| 47 | +#' [article on usethis setup](https://usethis.r-lib.org/articles/articles/usethis-setup.html) |
| 48 | +#' for more details. |
| 49 | +#' |
| 50 | +#' - `usethis.destdir`: Default directory in which to place new projects |
| 51 | +#' downloaded by [use_course()] and [create_from_github()]. |
| 52 | +#' If this option is unset, the user's Desktop or similarly conspicuous place |
| 53 | +#' will be used. |
| 54 | +#' |
| 55 | +#' - `usethis.protocol`: specifies your preferred transport protocol for Git. |
| 56 | +#' Either "https" (default) or "ssh": |
| 57 | +#' * `usethis.protocol = "https"` implies `https://github.com/<OWNER>/<REPO>.git` |
| 58 | +#' * `usethis.protocol = "ssh"` implies `git@@github.com:<OWNER>/<REPO>.git` |
| 59 | +#' |
| 60 | +#' You can also change this for the duration of your R session with |
| 61 | +#' [use_git_protocol()]. |
| 62 | +#' |
| 63 | +#' - `usethis.overwrite`: If `TRUE`, usethis overwrites an existing file without |
| 64 | +#' asking for user confirmation if the file is inside a Git repo. The |
| 65 | +#' rationale is that the normal Git workflow makes it easy to see and |
| 66 | +#' selectively accept/discard any proposed changes. |
| 67 | +#' |
| 68 | +#' - `usethis.quiet`: Set to `TRUE` to suppress user-facing messages. Default |
| 69 | +#' `FALSE`. |
| 70 | +#' |
| 71 | +#' - `usethis.allow_nested_project`: Whether or not to allow |
| 72 | +#' you to create a project inside another project. This is rarely a good idea, |
| 73 | +#' so this option defaults to `FALSE`. |
| 74 | +#' |
| 75 | +#' @name usethis_options |
| 76 | +NULL |
| 77 | + |
13 | 78 | release_bullets <- function() { |
14 | 79 | c( |
15 | 80 | "Check that `use_code_of_conduct()` is shipping the latest version of the Contributor Covenant (<https://www.contributor-covenant.org>)." |
|
0 commit comments