Sha256: 4683aa264940948be6310f46954f083e4320cf8db5e1c0fe1604b0fa515df852

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require "rails/engine"
require "ariadne/classify/utilities"

module Ariadne
  module ViewComponents
    # :nodoc:
    class Engine < ::Rails::Engine
      isolate_namespace Ariadne::ViewComponents
      config.eager_load_paths = ["#{root}/app/components", "#{root}/app/lib"]

      config.ariadne_view_components = ActiveSupport::OrderedOptions.new

      config.ariadne_view_components.raise_on_invalid_options = true
      config.ariadne_view_components.silence_deprecations = false
      config.ariadne_view_components.silence_warnings = false
      config.ariadne_view_components.validate_class_names = true
      config.ariadne_view_components.raise_on_invalid_aria = true

      initializer "ariadne_view_components.assets" do |app|
        app.config.assets.precompile += ["ariadne_view_components"] if app.config.respond_to?(:assets)
      end

      config.after_initialize do |app|
        ::Ariadne::Classify::Utilities.validate_class_names = app.config.ariadne_view_components.delete(:validate_class_names)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.3 lib/ariadne/view_components/engine.rb
ariadne_view_components-0.0.2 lib/ariadne/view_components/engine.rb
ariadne_view_components-0.0.1 lib/ariadne/view_components/engine.rb