-
Notifications
You must be signed in to change notification settings - Fork 0
/
setupcode.R
53 lines (39 loc) · 1.13 KB
/
setupcode.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
#' ----------------------------------------
#' Script to startup the a YOUR_PKG_NAME package
#' using usethis
#' ----------------------------------------
library(usethis)
# create_tidy_package(glue::glue"{here::here()/../PKGNAME})
# setup package
use_code_of_conduct()
use_data_raw()
# use_LICENSE_FUNCTION()
# imports packages
use_package("magrittr")
use_package("tibble")
#use_package("PKG_TO_IMPORT")
# suggests packages
#use_package("PKG_TO_SUGGEST", type = "Suggests")
# add other elements
use_news_md()
#use_vignette("VIGNETTE_FILENAME", "VIGNETTE TITLE")
#-----------------------------
# Cleanup before release ####
#-----------------------------
# tweaks to the description before release
usethis::use_tidy_description()
# Are there things you should cleanup in this package?
styler::style_dir("R")
#styler::style_dir("data-raw") #can comment out if not including local data
goodpractice::gp()
# make a pkgdown website!
pkgdown::build_site()
# for release - checks!
devtools::check_win_release()
devtools::release_checks()
devtools::spell_check()
devtools::check_rhub()
#-------------
# Release ####
#-------------
devtools::release()