Converts a directory tree into a theme where each file becomes a
step_file(). An optional _prefab.yml sidecar file in the directory
can override the strategy and template data per file.
Arguments
- path
Path to a directory of template files. Resolved to an absolute path via
fs::path_abs(). Must exist.- strategy
Default merge strategy for all files. Can be overridden per file via a
_prefab.ymlsidecar. One of"overwrite","skip","union","append", or"merge_json".
Examples
if (FALSE) { # \dontrun{
# Create a theme from a directory of config files
use_theme(theme_from_dir("~/my-template"))
# Compose with other themes
use_theme(r_analysis() + theme_from_dir("~/my-extras"))
} # }
