R/depreciated/use_coc.R

Defines functions use_coc

#' Add a code of conduct for either project or package
#'
#' @author Jiaxiang Li
#'
#' @param path The directory to save coc.
#' @importFrom usethis use_template
#'
#' @export
use_coc <- function(path = ".") {
    name = "CODE_OF_CONDUCT.md"
    if (file.exists(name)) {
        stop("Code of Conduct already exists.")
    }
    usethis::use_template(
        name
        ,save_as = file.path(".",name)
        ,ignore = F
        ,package = 'usethis'
    )
}
JiaxiangBU/add2md documentation built on Jan. 31, 2020, 7:46 p.m.