Skip to contents

This function initializes the configuration sub-directory setup by creating a sub-directory: config.d/ in the root config/ directory to house configuration files for different environments or purposes that can be merged together.

Usage

cfg_d_init(
  path = here::here("inst/config"),
  configs = list(example = list(default = list(NULL))),
  merge = TRUE,
  ignore = TRUE,
  overwrite = FALSE,
  templates = FALSE,
  include_encrypted = FALSE,
  ...
)

Arguments

path

Path to the configuration directory. Defaults to inst/config.

configs

A list of configuration lists for different environments or purposes. The list should contain named lists of configuration settings where the names represent what will be used for the name of the configuration file. See details for more information and examples.

merge

Merge the configuration files from the config.d/ directory into the config.yml file? Defaults to TRUE.

ignore

Add a .gitignore to the config.d/ directory to ignore the generated configuration files? Default is TRUE.

overwrite

Overwrite the existing configuration files. Defaults to FALSE.

templates

Create configuration template files for each configuration file? Defaults to FALSE.

include_encrypted

Create encrypted configuration files for each configuration file? Defaults to FALSE.

...

Additional arguments passed to other functions.

Value

Invisibly returns the merged configuration settings.