document_toolsR Documentation

Generate documentation for build tools

Description

Extracts roxygen documentation from selected handwritten build-tool files and writes the generated artifacts to 'tools/man/'. Documentation is generated file-by-file using the 'document' package so tool scripts can be documented without moving them into the package 'R/' tree.

Usage

document_tools(
  files = NULL,
  output_dir = file.path("tools", "man"),
  root = ".",
  clean = TRUE,
  verbose = interactive()
)

Arguments

files

Optional character vector of tool script paths, relative to the repository root. If 'NULL', documents the standard handwritten tool entry points.

output_dir

Output directory for generated documentation, relative to the repository root.

root

Repository root directory.

clean

Logical scalar. Passed through to [document::document()] to clean its temporary working directory.

verbose

Logical scalar. If 'TRUE', emits a short summary of generated and removed stale files.

Details

CLI entry point: './tools/document_tools.R –help'

Value

A list describing the documentation run, including input files, generated files, and removed files.

Examples

## Not run: 
document_tools()
document_tools(files = "tools/clean_webawesome.R")

## End(Not run)