File: usethis.R

package info (click to toggle)
r-cran-devtools 2.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,340 kB
  • sloc: sh: 15; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Some helpers around usethis functions

# we need to import some usethis function so the namespace is loaded when
# devtools is loaded, but not attached.
#' @importFrom usethis use_test
NULL

usethis_use_testthat <- function(pkg) {
  usethis::local_project(pkg$path, quiet = FALSE)
  usethis::use_testthat()
}

usethis_use_directory <- function(pkg, path, ignore = FALSE) {
  usethis::local_project(pkg$path, quiet = TRUE)
  usethis::use_directory(path, ignore)
}

usethis_use_git_ignore <- function(pkg, ignores, ignore = FALSE) {
  usethis::local_project(pkg$path, quiet = TRUE)
  usethis::use_git_ignore(ignores)
}