Sha256: ceb9194ca96abe2c824380e162046a4b80d1b637aa90a042f6cda007262e003a
Contents?: true
Size: 1.92 KB
Versions: 90
Compression:
Stored size: 1.92 KB
Contents
# frozen_string_literal: true require "rails/engine" require "view_component" require "tailwind_merge" module Ariadne # The Ariadne gem is a collection of ViewComponents that can be used to build # accessible, responsive, and consistent UIs for Yetto. module ViewComponents mattr_accessor :tailwind_merger # :nodoc: class Engine < ::Rails::Engine isolate_namespace Ariadne::ViewComponents config.autoload_paths = ["#{root}/lib"] config.eager_load_paths = ["#{root}/app/components", "#{root}/app/helpers", "#{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 initializer "ariadne_view_components.importmap", before: "importmap" do |app| if Rails.application.respond_to?(:importmap) app.config.importmap.paths << Engine.root.join("config/importmap.rb") end end initializer "ariadne_view_components.zeitwerk_ignore" do Rails.autoloaders.each do |autoloader| autoloader.ignore(Engine.root.join("lib", "ariadne", "view_components", "linters.rb")) autoloader.ignore(Engine.root.join("lib", "ariadne", "view_components", "linters", "**", "*.rb")) autoloader.ignore(Engine.root.join("lib", "ariadne", "view_components", "statuses.rb")) end end config.after_initialize do |_app| Ariadne::ViewComponents.tailwind_merger = TailwindMerge::Merger.new end end end end
Version data entries
90 entries across 90 versions & 1 rubygems