1# Some helpers around usethis functions 2 3# we need to import some usethis function so the namespace is loaded when 4# devtools is loaded, but not attached. 5#' @importFrom usethis use_test 6NULL 7 8usethis_use_testthat <- function(pkg) { 9 usethis::local_project(pkg$path, quiet = TRUE) 10 usethis::use_testthat() 11} 12 13usethis_use_directory <- function(pkg, path, ignore = FALSE) { 14 usethis::local_project(pkg$path, quiet = TRUE) 15 usethis::use_directory(path, ignore) 16} 17 18usethis_use_git_ignore <- function(pkg, ignores, ignore = FALSE) { 19 usethis::local_project(pkg$path, quiet = TRUE) 20 usethis::use_git_ignore(ignores) 21} 22