13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/generators/reactionview/install_generator.rb', line 13
def create_initializer
say "Creating ReActionView initializer...", :green
create_file "config/initializers/reactionview.rb", <<~RUBY
# frozen_string_literal: true
ReActionView.configure do |config|
# Intercept .html.erb templates and process them with `Herb::Engine` for enhanced features
# config.intercept_erb = true
# Enable debug mode in development (adds debug attributes to HTML)
config.debug_mode = Rails.env.development?
# Path used for editor "open in editor" links (optional, defaults to Rails.root)
# config.project_path = ENV.fetch('PROJECT_PATH', Rails.root.to_s)
# Validation mode (:raise, :overlay, or :none) ā defaults to :raise in test, :overlay otherwise
# config.validation_mode = :overlay
# How to handle templates that come from gems (:fallback, :skip, or :compile), defaults to :fallback
# config.external_template_mode = :skip
# Add custom transform visitors to process templates before compilation
# config.transform_visitors = [
# Herb::Visitor::new
# ]
end
RUBY
end
|