1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
# frozen_string_literal: true
require "action_view"
require "active_support/dependencies/autoload"
module ViewComponent
extend ActiveSupport::Autoload
autoload :Base
autoload :Compiler
autoload :CompileCache
autoload :ComponentError
autoload :Config
autoload :Deprecation
autoload :Instrumentation
autoload :Preview
autoload :PreviewTemplateError
autoload :TestHelpers
autoload :TestCase
autoload :TemplateError
autoload :Translatable
end
# :nocov:
if defined?(ViewComponent::Engine)
ViewComponent::Deprecation.warn(
"Manually loading the engine is deprecated and will be removed in v3.0.0. " \
"Remove `require \"view_component/engine\"`."
)
elsif defined?(Rails::Engine)
require "view_component/engine"
end
# :nocov:
|