Class: SewingKit::Webpack::Manifest::Development

Inherits:
Base
  • Object
show all
Defined in:
lib/sewing_kit/webpack/manifest/development.rb

Instance Method Summary collapse

Constructor Details

#initializeDevelopment

Returns a new instance of Development.



9
10
11
12
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 9

def initialize
  super
  @metadata_path = nil
end

Instance Method Details

#asset_bundle_name(_user_agent) ⇒ Object



14
15
16
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 14

def asset_bundle_name(_user_agent)
  "dev"
end

#asset_dependencies(entrypoint_name, _user_agent) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 18

def asset_dependencies(entrypoint_name, _user_agent)
   = 
  if .key?("development")
    ["development"]["hangTight"]
  else
    ["entrypoints"][entrypoint_name]
  end
end

#clear_cache!Object



27
28
29
30
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 27

def clear_cache!
  super
  @metadata_path = nil
end

#load_metadataObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 40

def 
  begin
    if @metadata_path
      result = (@metadata_path)
      return (result)
    end
  rescue => e
    Rails.logger.warn(
      "[sewing_kit] could not read manifest from #{@metadata_path}; falling back to node.  #{e}"
    )
    @metadata_path = nil
  end

  result = 

   = (result)
  @metadata_path =  && ["path"]
  
end

#manifestObject



32
33
34
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 32

def manifest
  raise OnlyUseInProductionError
end

#metadataObject



36
37
38
# File 'lib/sewing_kit/webpack/manifest/development.rb', line 36

def 
  
end