% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/att_from_rmds.R
\name{att_from_rmds}
\alias{att_from_rmds}
\alias{att_from_qmds}
\title{Get all packages called in vignettes folder}
\usage{
att_from_rmds(
  path = "vignettes",
  pattern = "*.[.](Rmd|rmd|qmd)$",
  recursive = TRUE,
  warn = -1,
  inside_rmd = NULL,
  inline = TRUE,
  folder_to_exclude = "renv"
)

att_from_qmds(
  path = "vignettes",
  pattern = "*.[.](Rmd|rmd|qmd)$",
  recursive = TRUE,
  warn = -1,
  inside_rmd = NULL,
  inline = TRUE,
  folder_to_exclude = "renv"
)
}
\arguments{
\item{path}{path to directory with Rmds or vector of Rmd files}

\item{pattern}{pattern to detect Rmd files}

\item{recursive}{logical. Should the listing recurse into directories?}

\item{warn}{-1 for quiet warnings with purl, 0 to see warnings}

\item{inside_rmd}{Logical or \code{NULL}. Whether the function is being called
from inside a knit session, in which case the actual purl step must be
delegated to an external R process. When \code{NULL} (the default), this is
auto-detected via \code{knitr::opts_knit$get("out.format")}.}

\item{inline}{Logical. Default TRUE. Whether to explore inline code for dependencies.}

\item{folder_to_exclude}{Folder to exclude during scan to detect packages 'renv' by default}
}
\value{
Character vector of packages called with library or require.
When the directory contains "vignettes" in its path, \code{knitr} is always added
and the vignette engine is inferred from the files actually present:
\code{rmarkdown} is added when \code{.Rmd} files are found, \code{quarto} when \code{.qmd}
files are found (both when the directory mixes the two). If the directory
is empty, \code{rmarkdown} is added as a safe default.
}
\description{
Get all packages called in vignettes folder
}
\examples{
dummypackage <- system.file("dummypackage",package = "attachment")
# browseURL(dummypackage)
att_from_rmds(path = file.path(dummypackage,"vignettes"))
}
