Class: Blacklight::AssetsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/blacklight/assets_generator.rb

Instance Method Summary collapse

Instance Method Details

#run_asset_pipeline_specific_generatorObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/blacklight/assets_generator.rb', line 7

def run_asset_pipeline_specific_generator
  generated_options = "--bootstrap-version='#{options[:'bootstrap-version']}'" if options[:'bootstrap-version']

  generator = if defined?(Propshaft)
                'blacklight:assets:propshaft'
              elsif defined?(Importmap)
                'blacklight:assets:importmap'
              elsif defined?(Sprockets)
                'blacklight:assets:sprockets'
              end

  generate generator, generated_options if generator
end