Class: Webpacker::Remote::Configuration

Inherits:
Configuration
  • Object
show all
Defined in:
lib/webpacker/remote/configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(root_path:, config_path:, env:, **config_content) ⇒ Configuration

rubocop:disable Lint/MissingSuper



7
8
9
10
11
12
13
14
15
16
# File 'lib/webpacker/remote/configuration.rb', line 7

def initialize(root_path:, config_path:, env:, **config_content)
  # deliberately not calling `super` just emulating what's done there
  # because we accept overloading to DI the content of `webpacker.yml` inline
  @root_path = root_path
  @config_path = config_path
  @env = env

  # addition
  @config_content = config_content
end

Instance Method Details

#loadObject

rubocop:enable Lint/MissingSuper



19
20
21
22
23
24
25
# File 'lib/webpacker/remote/configuration.rb', line 19

def load
  {
    cache_manifest: true,
    check_yarn_integrity: false,
    compile: false
  }.merge(@config_content)
end

#manifest_pathObject

shakapacker error message



28
29
30
# File 'lib/webpacker/remote/configuration.rb', line 28

def manifest_path
  public_manifest_path
end

#public_manifest_pathObject

webpacker error message



33
34
35
# File 'lib/webpacker/remote/configuration.rb', line 33

def public_manifest_path
  public_remote_manifest_path
end