forked from ThinkR-open/engineering-shiny-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
before-build.R
70 lines (62 loc) · 2.26 KB
/
before-build.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
# To do locally on Colin's computer, thanks
options(repos = c(REPO_NAME = "https://packagemanager.rstudio.com/all/latest"))
remotes::install_github("lbartnik/subprocess")
remotes::install_github("rstudio/websocket")
remotes::install_github("thinkr-open/bank")
paks <- c(
"cloc", "dplyr", "cyclocomp", "tidytuesday201942", "shiny", "packageMetrics2",
"remotes", "readr", "here", "tibble", "knitr", "desc", "attachment", "magrittr",
"tools", "fs", "glue", "dichromat", "purrr", "htmltools", "matlab", "viridis",
"golem", "shinipsum", "ggplot2", "DT", "fakir", "shinyloadtest", "dockerstats",
"attempt", "dockerfiler", "Rcpp", "profmem", "bench", "jsonlite", "cli", "memoise",
"tictoc", "promises", "future", "liteq", "DBI", "RSQLite", "xfun",
'bookdown', 'knitr', 'rmarkdown', 'tidyverse',
'testthat', 'usethis', 'config', 'hexmake', 'shinyalert',
'plotly', 'shinyMobile', 'resume', 'nessy','skeleton',
'fullPage', 'bs4Dash', 'shinydashboardPlus',
'sf', 'devtools', 'crrri',
'chromote',
'crrry', 'shinytest', 'processx',
'renv', 'geojsonsf', 'pkgbuild', 'profvis',
'gargoyle', 'dplyr', 'dbplyr', 'vroom',
'data.table', 'jsonlite', 'readxl',
'R.cache', 'glouton', 'bubble', 'roxygen2',
'covr', 'rcmdcheck', 'covrpage',
'dccvalidator', 'minifyr', 'sever', 'shinyFeedback',
"whereami", "RcppSimdJson", "foreign", "haven",
"tidymodules", "shinyjs", "htmlwidgets",
"hunspell", "rhub", "spelling", "tufte", "uuid",
"attachment", "remotes", "usethis", "namer", "desc", "spelling", "tufte",
"dockerstats", "spelling", "tidymodules", "bank", "downlit", "bslib"
)
paks <- unique(paks)
# for (i in paks){
# if (!requireNamespace(i)){
# install.packages(i)
# }
# }
cran_paks <- tools::CRAN_package_db()
desc_pak <- desc::desc_get_deps()$package
for (pak in paks){
if ( !(pak %in% desc_pak)){
try({
if (pak %in% cran_paks$Package){
usethis::use_package(pak)
} else {
usethis::use_dev_package(pak)
}
})
}
}
usethis::use_tidy_description()
remotes::install_local(Ncpus = 4, upgrade = "never", force = TRUE)
knitr::write_bib(c(
unique(paks)
), 'packages.bib')
# purrr::walk(
# list.files(path = ".", pattern = ".Rmd$"),
# function(x){
# cli::cat_rule(x)
# namer::name_chunks(x)
# }
# )