Module: Bridgetown::Commands::ConfigurationOverridable

Included in:
Build, Clean, Console, Doctor, Plugins, Start
Defined in:
bridgetown-core/lib/bridgetown-core/commands/concerns/configuration_overridable.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



6
7
8
9
10
11
# File 'bridgetown-core/lib/bridgetown-core/commands/concerns/configuration_overridable.rb', line 6

def self.included(klass)
  desc = "The environment used for this command (aka development, test, production, etc.)"
  klass.class_option :environment,
                     aliases: "-e",
                     desc:
end

Instance Method Details

#configuration_with_overrides(options, preloaded = nil) ⇒ Bridgetown::Configuration

Create a full Bridgetown configuration with the options passed in as overrides

Parameters:

Returns:



19
20
21
22
23
# File 'bridgetown-core/lib/bridgetown-core/commands/concerns/configuration_overridable.rb', line 19

def configuration_with_overrides(options, preloaded = nil)
  return preloaded.merge!(options) if preloaded.is_a?(Bridgetown::Configuration)

  Bridgetown.configuration(options)
end