-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_package.R
133 lines (92 loc) · 3.41 KB
/
build_package.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
xfun::gsub_dir(pattern = "frameCleaneR", replacement = "framecleaner")
# load developer libraries ------------------------------------------------
library(pacman)
p_load(rstudioapi, devtools, roxygen2, usethis, pkgdown,
ymlthis, magrittr, fs, covr, gitcreds, credentials,
badger, hexSticker, gh, xfun, tidyverse, r2symbols)
# create functions --------------------------------------------------------
usethis::use_r("manipulate_dates")
# add this file to .Rbuildignore ------------------------------------------
file_name <- rstudioapi::getSourceEditorContext()$path %>% fs::path_file()
use_build_ignore(file_name)
# begin pkgdown -----------------------------------------------------------
usethis::use_pkgdown()
# create yaml -------------------------------------------------------------
ymlthis::pkgdown_template() %>%
ymlthis::use_pkgdown_yml()
# usethis: add packages ---------------------------------------------------
usethis::use_pipe()
usethis::use_package("rstudioapi")
usethis::use_package("dplyr")
usethis::use_package("stringr")
usethis::use_package("tidyselect")
usethis::use_package("purrr")
usethis::use_package("tidyr")
usethis::use_package("janitor")
usethis::use_package("tibble")
usethis::use_package("rlang")
usethis::use_package("lubridate")
usethis::use_package("bit64")
usethis::use_package("vroom")
usethis::use_package("readxl")
usethis::use_package("badger", type = "Suggests")
usethis::use_r("create_flag")
usethis::use_r("set_fct")
usethis::use_r("set_dbl")
usethis::use_r("set_int")
usethis::use_r("set_chr")
usethis::use_r("set_date")
usethis::use_r("set_lgl")
# edit R profile ----------------------------------------------------------
edit_r_profile()
# add rmd sections with usethis -------------------------------------------
use_readme_rmd()
use_news_md()
usethis::use_mit_license()
# add badges to readme ----------------------------------------------------
use_lifecycle_badge("experimental")
use_cran_badge()
use_github_actions_badge()
# `r badger::badge_cran_download("frameCleaneR", "grand-total", "blue")`
# `r badger::badge_code_size("Harrison4192/frameCleaneR")`
# `r badger::badge_last_commit("Harrison4192/frameCleaneR")`
# set github token --------------------------------------------------------
# gh_token_help()
create_github_token()
gitcreds_set()
gitcreds_get()
set_github_pat()
# credentials::git_credential_forget()
gh::gh_whoami()
gh_token()
credentials::credential_helper_get()
git_credential_ask()
# git config --global credential.helper osxkeychain
# use github actions and links --------------------------------------------
usethis::use_github_action("check-standard")
usethis::use_github_action("test-coverage")
usethis::use_github_action("render-rmarkdown")
usethis::use_github_action("pkgdown")
usethis::use_github_actions()
usethis::use_github_links()
usethis::use_github_pages()
usethis::use_version("patch")
p_load(available)
available("validata")
# build and check ---------------------------------------------------------
devtools::find_rtools(T);Sys.getenv("PATH")
pkgbuild::has_build_tools()
devtools::document()
devtools::build_readme()
devtools::build_manual()
devtools::build_vignettes()
devtools::build_site()
devtools::check()
preview_site()
devtools::build_vignettes()
devtools::spell_check()
devtools::release(check = T)
usethis::use_cran_comments(open = rlang::is_interactive())
devtools::check_win_devel()
devtools::check_rhub()
devtools::submit_cran()