Class: WebpackerLite::Configuration
- Inherits:
-
FileLoader
- Object
- FileLoader
- WebpackerLite::Configuration
- Defined in:
- lib/webpacker_lite/configuration.rb
Instance Attribute Summary
Attributes inherited from FileLoader
Class Method Summary collapse
- .config_path ⇒ Object
- .file_path ⇒ Object
- .manifest_path ⇒ Object
- .output_path ⇒ Object
- .paths ⇒ Object
- .source_path ⇒ Object
Methods inherited from FileLoader
Class Method Details
.config_path ⇒ Object
7 8 9 |
# File 'lib/webpacker_lite/configuration.rb', line 7 def config_path Rails.root.join(paths.fetch(:config, "config/webpack")) end |
.file_path ⇒ Object
11 12 13 |
# File 'lib/webpacker_lite/configuration.rb', line 11 def file_path Rails.root.join("config", "webpack", "paths.yml") end |
.manifest_path ⇒ Object
15 16 17 |
# File 'lib/webpacker_lite/configuration.rb', line 15 def manifest_path Rails.root.join(output_path, paths.fetch(:manifest, "manifest.json")) end |
.output_path ⇒ Object
19 20 21 |
# File 'lib/webpacker_lite/configuration.rb', line 19 def output_path Rails.root.join(paths.fetch(:output, "public"), paths.fetch(:assets, "assets/webpack")) end |
.paths ⇒ Object
23 24 25 26 27 |
# File 'lib/webpacker_lite/configuration.rb', line 23 def paths load if WebpackerLite::Env.development? raise WebpackerLite::FileLoader::FileLoaderError.new("WebpackerLite::Configuration.load must be called first") unless instance instance.data end |
.source_path ⇒ Object
29 30 31 |
# File 'lib/webpacker_lite/configuration.rb', line 29 def source_path Rails.root.join(paths.fetch(:source, "app/javascript")) end |