Class: AmberComponent::Configuration
- Inherits:
-
Object
- Object
- AmberComponent::Configuration
- Defined in:
- lib/amber_component/configuration.rb
Overview
Object which stores configuration options for this gem.
Constant Summary collapse
- STIMULUS_INTEGRATIONS =
::Set[nil, :importmap, :webpacker, :jsbundling, :webpack, :esbuild, :rollup]
- ALLOWED_STYLES =
::Set.new(%i[css scss sass])
- ALLOWED_VIEWS =
::Set.new(%i[erb haml slim])
Instance Attribute Summary collapse
-
#stimulus ⇒ Symbol?
How Stimulus.js is bundled in this app.
-
#stylesheet_format ⇒ Symbol?
The default format that the generators will use for the stylesheets of a component.
-
#view_format ⇒ Symbol?
The default format that the generators will use for the view/template file of a component.
Instance Method Summary collapse
Instance Attribute Details
#stimulus ⇒ Symbol?
How Stimulus.js is bundled in this app. Possible values: ‘[nil, :importmap, :webpacker, :jsbundling, :webpack, :esbuild, :rollup]` `nil` indicates that stimulus should not be used (default behaviour).
19 20 21 |
# File 'lib/amber_component/configuration.rb', line 19 def stimulus @stimulus end |
#stylesheet_format ⇒ Symbol?
The default format that the generators will use for the stylesheets of a component. Possible values: ‘[nil, :css, :scss, :sass]`
33 34 35 |
# File 'lib/amber_component/configuration.rb', line 33 def stylesheet_format @stylesheet_format end |
#view_format ⇒ Symbol?
The default format that the generators will use for the view/template file of a component. Possible values: ‘[nil, :erb, :haml, :slim]`
26 27 28 |
# File 'lib/amber_component/configuration.rb', line 26 def view_format @view_format end |
Instance Method Details
#stimulus? ⇒ Boolean
76 77 78 |
# File 'lib/amber_component/configuration.rb', line 76 def stimulus? !@stimulus.nil? end |
#stimulus_importmap? ⇒ Boolean
81 82 83 |
# File 'lib/amber_component/configuration.rb', line 81 def stimulus_importmap? @stimulus == :importmap end |