From 84e7c939e6836ab3bba09e2c828b679a1036a7d6 Mon Sep 17 00:00:00 2001 From: Luke Johnston Date: Thu, 6 Jun 2019 15:14:38 +0200 Subject: [PATCH] don't need and minor typo fixes --- R/extract-deps.R | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/R/extract-deps.R b/R/extract-deps.R index 3ccb42c..307573a 100644 --- a/R/extract-deps.R +++ b/R/extract-deps.R @@ -1,7 +1,7 @@ -extract_rpkg_deps <- function(.file) { +extract_rpkg_deps <- function(.req_file) { # TODO: Deal with versions? - .file %>% + .req_file %>% readr::read_lines() %>% str_subset("install") %>% str_extract('\".*\"') %>% @@ -12,17 +12,3 @@ extract_rpkg_deps <- function(.file) { add_deps_imports <- function(.deps) { purrr::walk(.deps, usethis::use_package) } - -deps_to_desc <- function(.file) { - deps <- .file %>% - extract_rpkg_deps() - - # TODO: Check if DESCRIPTION file exists. - add_deps_imports(deps) - - # TODO: Use something like withr instead of here? - fs::file_delete(here::here("requirements.R")) - - return(invisible(NULL)) -} -