Conform.Config

This module is responsible for reading and writing, and manipulating *.config files

Summary

merge(config1, config2)

Merge two configs together to produce a new unified config. The second argument represents the config with the highest precedence in the case of conflicts

pretty(config)

apply pretty formatting to a config

print(config)

Print a config to the console with pretty formatting

print_raw(config)

Print a config to the console without applying any formatting

read(path)

Read an app.config/sys.config from the provided path. Returns the config as Elixir terms

write(path, config)

Write a config (in the form of Elixir terms) to disk in the required *.config format

Functions

merge(config1, config2)

Specs:

Merge two configs together to produce a new unified config. The second argument represents the config with the highest precedence in the case of conflicts.

pretty(config)

apply pretty formatting to a config

print(config)

Print a config to the console with pretty formatting

Print a config to the console without applying any formatting

read(path)

Specs:

  • read(binary) :: [term]

Read an app.config/sys.config from the provided path. Returns the config as Elixir terms.

write(path, config)

Specs:

  • write(binary, term) :: :ok | {:error, term}

Write a config (in the form of Elixir terms) to disk in the required *.config format.