Lux::Config - Config loader helpers

Methods for config and pluin loading.

Lux::Config::Plugins

Lux.plugin name_or_folder
Lux.plugin name: :foo, folder: '/.../...', namespace: [:main, :admin]
Lux.plugin name: :bar

Luxp.lugin.folders :admin # => [:foo]
Luxp.lugin.folders # => [:foo, :bar]

Lux::Config::Secrets

Similar to rails 5.1+, we can encode secrets for easy config.

lux secrets

Example

Env development

Secrets file ./tmp/secrets.yaml

shared:
  x: s
  b:
    c: nested

production:
  a: p

development:
  a: d

lux secrets - will compile secrets or create template if needed

lux c - console

Lux.secrets.a == "d"
Lux.secrets.x == "s"
Lux.secrets.b.c == "nested"