Module: Webpack::Manifest
- Defined in:
- lib/webpack/manifest.rb,
lib/webpack/manifest/entries.rb,
lib/webpack/manifest/configuration.rb
Defined Under Namespace
Classes: Configuration, Entries
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
10
11
12
|
# File 'lib/webpack/manifest.rb', line 10
def config
@config ||= Configuration.new
end
|
6
7
8
|
# File 'lib/webpack/manifest.rb', line 6
def configure
yield config
end
|
.load(path) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/webpack/manifest.rb', line 14
def load(path)
uri = URI.parse(path.to_s)
str = case uri
when URI::HTTP, URI::HTTPS
OpenURI.open_uri(uri.to_s).read
else File.read(uri.path)
end
entries = JSON.parse str
Entries.new entries
end
|