You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the usethis::use_r() function is very handy but we don't always want to put things into the R folder when working on projects. Below an example of use_js created for the IRB_tracking project
#' Use js folder to create js scripts
#'
#' Like use_r but for javascript
#'
#' @param name String. Name of file
#' @param open Logical. if True, file will open after creation
#'
#' @return
#' @export
#'
#' @examples
use_js <- function(name, open = rlang::is_interactive() ){
name <- sprintf("%s.js",name)
usethis::use_directory("js")
usethis::edit_file(usethis::proj_path("js",name), open = open)
status <- file.exists(usethis::proj_path("js",name))
invisible(TRUE)
}
The text was updated successfully, but these errors were encountered:
the usethis::use_r() function is very handy but we don't always want to put things into the R folder when working on projects. Below an example of use_js created for the IRB_tracking project
The text was updated successfully, but these errors were encountered: