Class: AssetMapper::Configuration
- Inherits:
-
Object
- Object
- AssetMapper::Configuration
- Extended by:
- Forwardable
- Includes:
- Dry::Configurable
- Defined in:
- lib/asset_mapper/configuration.rb
Overview
Configuration object for asset mapper. This is the top level API.
Instance Method Summary collapse
-
#asset_files ⇒ Array<String>
Files for AssetMapper to watch for changes and generate hashes for.
-
#cache_manifest ⇒ Boolean
Whether or not to cache the manifest.
-
#manifest ⇒ AssetMapper::Manifest
Returns an instance of the manifest.
-
#manifest_files ⇒ String[]
Where to find the json mapping of your asset files.
-
#manifest_generator ⇒ AssetMapper::ManifestGenerator
Returns an instance of a manifest generator.
-
#raise_on_duplicate_key ⇒ Boolean
Raise an error if the same key is found twice across the same or multiple manifests.
-
#raise_on_missing_file ⇒ Boolean
Raise an error if the file can’t be found.
Instance Method Details
#asset_files ⇒ Array<String>
Files for AssetMapper to watch for changes and generate hashes for. Accepts glob patterns like Dir.
33 |
# File 'lib/asset_mapper/configuration.rb', line 33 setting :asset_files, default: [] |
#cache_manifest ⇒ Boolean
Whether or not to cache the manifest.
20 |
# File 'lib/asset_mapper/configuration.rb', line 20 setting :cache_manifest, constructor: lambda { |value| !!value } |
#manifest ⇒ AssetMapper::Manifest
Returns an instance of the manifest.
57 58 59 |
# File 'lib/asset_mapper/configuration.rb', line 57 def manifest @manifest ||= Manifest.new(config) end |
#manifest_files ⇒ String[]
Where to find the json mapping of your asset files.
13 |
# File 'lib/asset_mapper/configuration.rb', line 13 setting :manifest_files, default: [] |
#manifest_generator ⇒ AssetMapper::ManifestGenerator
Returns an instance of a manifest generator. This is for files that are watched by asset_mapper.
63 64 65 |
# File 'lib/asset_mapper/configuration.rb', line 63 def manifest_generator @manifest_generator ||= ManifestGenerator.new(config) end |
#raise_on_duplicate_key ⇒ Boolean
Raise an error if the same key is found twice across the same or multiple manifests.
28 |
# File 'lib/asset_mapper/configuration.rb', line 28 setting :raise_on_duplicate_key, default: false |
#raise_on_missing_file ⇒ Boolean
Raise an error if the file can’t be found. Useful in development.
24 |
# File 'lib/asset_mapper/configuration.rb', line 24 setting :raise_on_missing_file, default: false |