Class: ReactOnRails::Configuration
- Inherits:
-
Object
- Object
- ReactOnRails::Configuration
- Defined in:
- lib/react_on_rails/configuration.rb
Instance Attribute Summary collapse
-
#auto_load_bundle ⇒ Object
Returns the value of attribute auto_load_bundle.
-
#build_production_command ⇒ Object
Returns the value of attribute build_production_command.
-
#build_test_command ⇒ Object
Returns the value of attribute build_test_command.
-
#check_database_on_dev_start ⇒ Object
Returns the value of attribute check_database_on_dev_start.
-
#component_registry_timeout ⇒ Object
Returns the value of attribute component_registry_timeout.
-
#components_subdirectory ⇒ Object
Returns the value of attribute components_subdirectory.
-
#defer_generated_component_packs ⇒ Object
Returns the value of attribute defer_generated_component_packs.
-
#development_mode ⇒ Object
Returns the value of attribute development_mode.
-
#enforce_private_server_bundles ⇒ Object
Returns the value of attribute enforce_private_server_bundles.
-
#generated_assets_dir ⇒ Object
Returns the value of attribute generated_assets_dir.
-
#generated_assets_dirs ⇒ Object
Returns the value of attribute generated_assets_dirs.
-
#generated_component_packs_loading_strategy ⇒ Object
Returns the value of attribute generated_component_packs_loading_strategy.
-
#i18n_dir ⇒ Object
Returns the value of attribute i18n_dir.
-
#i18n_output_format ⇒ Object
Returns the value of attribute i18n_output_format.
-
#i18n_yml_dir ⇒ Object
Returns the value of attribute i18n_yml_dir.
-
#i18n_yml_safe_load_options ⇒ Object
Returns the value of attribute i18n_yml_safe_load_options.
-
#logging_on_server ⇒ Object
Returns the value of attribute logging_on_server.
-
#make_generated_server_bundle_the_entrypoint ⇒ Object
Returns the value of attribute make_generated_server_bundle_the_entrypoint.
-
#node_modules_location ⇒ Object
Returns the value of attribute node_modules_location.
-
#prerender ⇒ Object
Returns the value of attribute prerender.
-
#raise_on_prerender_error ⇒ Object
Returns the value of attribute raise_on_prerender_error.
-
#random_dom_id ⇒ Object
Returns the value of attribute random_dom_id.
-
#rendering_extension ⇒ Object
Returns the value of attribute rendering_extension.
-
#rendering_props_extension ⇒ Object
Returns the value of attribute rendering_props_extension.
-
#replay_console ⇒ Object
Returns the value of attribute replay_console.
-
#same_bundle_for_client_and_server ⇒ Object
Returns the value of attribute same_bundle_for_client_and_server.
-
#server_bundle_js_file ⇒ Object
Returns the value of attribute server_bundle_js_file.
-
#server_bundle_output_path ⇒ Object
Returns the value of attribute server_bundle_output_path.
-
#server_render_method ⇒ Object
Returns the value of attribute server_render_method.
-
#server_renderer_pool_size ⇒ Object
Returns the value of attribute server_renderer_pool_size.
-
#server_renderer_timeout ⇒ Object
Returns the value of attribute server_renderer_timeout.
-
#skip_display_none ⇒ Object
Returns the value of attribute skip_display_none.
-
#stores_subdirectory ⇒ Object
Returns the value of attribute stores_subdirectory.
-
#trace ⇒ Object
Returns the value of attribute trace.
-
#webpack_generated_files ⇒ Object
Returns the value of attribute webpack_generated_files.
Instance Method Summary collapse
-
#initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender: nil, replay_console: nil, make_generated_server_bundle_the_entrypoint: nil, trace: nil, development_mode: nil, defer_generated_component_packs: nil, logging_on_server: nil, server_renderer_pool_size: nil, server_renderer_timeout: nil, raise_on_prerender_error: true, skip_display_none: nil, generated_assets_dirs: nil, generated_assets_dir: nil, webpack_generated_files: nil, rendering_extension: nil, build_test_command: nil, build_production_command: nil, generated_component_packs_loading_strategy: nil, same_bundle_for_client_and_server: nil, i18n_dir: nil, i18n_yml_dir: nil, i18n_output_format: nil, i18n_yml_safe_load_options: nil, random_dom_id: nil, server_render_method: nil, rendering_props_extension: nil, components_subdirectory: nil, stores_subdirectory: nil, auto_load_bundle: nil, component_registry_timeout: nil, server_bundle_output_path: nil, enforce_private_server_bundles: nil, check_database_on_dev_start: nil) ⇒ Configuration
constructor
rubocop:disable Metrics/AbcSize.
-
#setup_config_values ⇒ Object
on ReactOnRails.
Constructor Details
#initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender: nil, replay_console: nil, make_generated_server_bundle_the_entrypoint: nil, trace: nil, development_mode: nil, defer_generated_component_packs: nil, logging_on_server: nil, server_renderer_pool_size: nil, server_renderer_timeout: nil, raise_on_prerender_error: true, skip_display_none: nil, generated_assets_dirs: nil, generated_assets_dir: nil, webpack_generated_files: nil, rendering_extension: nil, build_test_command: nil, build_production_command: nil, generated_component_packs_loading_strategy: nil, same_bundle_for_client_and_server: nil, i18n_dir: nil, i18n_yml_dir: nil, i18n_output_format: nil, i18n_yml_safe_load_options: nil, random_dom_id: nil, server_render_method: nil, rendering_props_extension: nil, components_subdirectory: nil, stores_subdirectory: nil, auto_load_bundle: nil, component_registry_timeout: nil, server_bundle_output_path: nil, enforce_private_server_bundles: nil, check_database_on_dev_start: nil) ⇒ Configuration
rubocop:disable Metrics/AbcSize
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/react_on_rails/configuration.rb', line 120 def initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender: nil, replay_console: nil, make_generated_server_bundle_the_entrypoint: nil, trace: nil, development_mode: nil, defer_generated_component_packs: nil, logging_on_server: nil, server_renderer_pool_size: nil, server_renderer_timeout: nil, raise_on_prerender_error: true, skip_display_none: nil, generated_assets_dirs: nil, generated_assets_dir: nil, webpack_generated_files: nil, rendering_extension: nil, build_test_command: nil, build_production_command: nil, generated_component_packs_loading_strategy: nil, same_bundle_for_client_and_server: nil, i18n_dir: nil, i18n_yml_dir: nil, i18n_output_format: nil, i18n_yml_safe_load_options: nil, random_dom_id: nil, server_render_method: nil, rendering_props_extension: nil, components_subdirectory: nil, stores_subdirectory: nil, auto_load_bundle: nil, component_registry_timeout: nil, server_bundle_output_path: nil, enforce_private_server_bundles: nil, check_database_on_dev_start: nil) self.node_modules_location = node_modules_location.present? ? node_modules_location : Rails.root self.generated_assets_dirs = generated_assets_dirs self.generated_assets_dir = generated_assets_dir self.build_test_command = build_test_command self.build_production_command = build_production_command self.i18n_dir = i18n_dir self.i18n_yml_dir = i18n_yml_dir self.i18n_output_format = i18n_output_format self. = self.random_dom_id = random_dom_id self.prerender = prerender self.replay_console = replay_console self.logging_on_server = logging_on_server self.development_mode = if development_mode.nil? Rails.env.development? else development_mode end self.trace = trace.nil? ? Rails.env.development? : trace self.raise_on_prerender_error = raise_on_prerender_error self.skip_display_none = skip_display_none self.rendering_props_extension = rendering_props_extension self.component_registry_timeout = component_registry_timeout # Server rendering: self.server_bundle_js_file = server_bundle_js_file self.same_bundle_for_client_and_server = same_bundle_for_client_and_server self.server_renderer_pool_size = self.development_mode ? 1 : server_renderer_pool_size self.server_renderer_timeout = server_renderer_timeout # seconds self.webpack_generated_files = webpack_generated_files self.rendering_extension = rendering_extension self.server_render_method = server_render_method self.components_subdirectory = components_subdirectory self.stores_subdirectory = stores_subdirectory self.auto_load_bundle = auto_load_bundle self.make_generated_server_bundle_the_entrypoint = make_generated_server_bundle_the_entrypoint self.defer_generated_component_packs = defer_generated_component_packs self.generated_component_packs_loading_strategy = generated_component_packs_loading_strategy self.server_bundle_output_path = server_bundle_output_path self.enforce_private_server_bundles = enforce_private_server_bundles self.check_database_on_dev_start = check_database_on_dev_start.nil? ? true : check_database_on_dev_start end |
Instance Attribute Details
#auto_load_bundle ⇒ Object
Returns the value of attribute auto_load_bundle.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def auto_load_bundle @auto_load_bundle end |
#build_production_command ⇒ Object
Returns the value of attribute build_production_command.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def build_production_command @build_production_command end |
#build_test_command ⇒ Object
Returns the value of attribute build_test_command.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def build_test_command @build_test_command end |
#check_database_on_dev_start ⇒ Object
Returns the value of attribute check_database_on_dev_start.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def check_database_on_dev_start @check_database_on_dev_start end |
#component_registry_timeout ⇒ Object
Returns the value of attribute component_registry_timeout.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def component_registry_timeout @component_registry_timeout end |
#components_subdirectory ⇒ Object
Returns the value of attribute components_subdirectory.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def components_subdirectory @components_subdirectory end |
#defer_generated_component_packs ⇒ Object
Returns the value of attribute defer_generated_component_packs.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def defer_generated_component_packs @defer_generated_component_packs end |
#development_mode ⇒ Object
Returns the value of attribute development_mode.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def development_mode @development_mode end |
#enforce_private_server_bundles ⇒ Object
Returns the value of attribute enforce_private_server_bundles.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def enforce_private_server_bundles @enforce_private_server_bundles end |
#generated_assets_dir ⇒ Object
Returns the value of attribute generated_assets_dir.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def generated_assets_dir @generated_assets_dir end |
#generated_assets_dirs ⇒ Object
Returns the value of attribute generated_assets_dirs.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def generated_assets_dirs @generated_assets_dirs end |
#generated_component_packs_loading_strategy ⇒ Object
Returns the value of attribute generated_component_packs_loading_strategy.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def generated_component_packs_loading_strategy @generated_component_packs_loading_strategy end |
#i18n_dir ⇒ Object
Returns the value of attribute i18n_dir.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def i18n_dir @i18n_dir end |
#i18n_output_format ⇒ Object
Returns the value of attribute i18n_output_format.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def i18n_output_format @i18n_output_format end |
#i18n_yml_dir ⇒ Object
Returns the value of attribute i18n_yml_dir.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def i18n_yml_dir @i18n_yml_dir end |
#i18n_yml_safe_load_options ⇒ Object
Returns the value of attribute i18n_yml_safe_load_options.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def @i18n_yml_safe_load_options end |
#logging_on_server ⇒ Object
Returns the value of attribute logging_on_server.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def logging_on_server @logging_on_server end |
#make_generated_server_bundle_the_entrypoint ⇒ Object
Returns the value of attribute make_generated_server_bundle_the_entrypoint.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def make_generated_server_bundle_the_entrypoint @make_generated_server_bundle_the_entrypoint end |
#node_modules_location ⇒ Object
Returns the value of attribute node_modules_location.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def node_modules_location @node_modules_location end |
#prerender ⇒ Object
Returns the value of attribute prerender.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def prerender @prerender end |
#raise_on_prerender_error ⇒ Object
Returns the value of attribute raise_on_prerender_error.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def raise_on_prerender_error @raise_on_prerender_error end |
#random_dom_id ⇒ Object
Returns the value of attribute random_dom_id.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def random_dom_id @random_dom_id end |
#rendering_extension ⇒ Object
Returns the value of attribute rendering_extension.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def rendering_extension @rendering_extension end |
#rendering_props_extension ⇒ Object
Returns the value of attribute rendering_props_extension.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def rendering_props_extension @rendering_props_extension end |
#replay_console ⇒ Object
Returns the value of attribute replay_console.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def replay_console @replay_console end |
#same_bundle_for_client_and_server ⇒ Object
Returns the value of attribute same_bundle_for_client_and_server.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def same_bundle_for_client_and_server @same_bundle_for_client_and_server end |
#server_bundle_js_file ⇒ Object
Returns the value of attribute server_bundle_js_file.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def server_bundle_js_file @server_bundle_js_file end |
#server_bundle_output_path ⇒ Object
Returns the value of attribute server_bundle_output_path.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def server_bundle_output_path @server_bundle_output_path end |
#server_render_method ⇒ Object
Returns the value of attribute server_render_method.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def server_render_method @server_render_method end |
#server_renderer_pool_size ⇒ Object
Returns the value of attribute server_renderer_pool_size.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def server_renderer_pool_size @server_renderer_pool_size end |
#server_renderer_timeout ⇒ Object
Returns the value of attribute server_renderer_timeout.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def server_renderer_timeout @server_renderer_timeout end |
#skip_display_none ⇒ Object
Returns the value of attribute skip_display_none.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def skip_display_none @skip_display_none end |
#stores_subdirectory ⇒ Object
Returns the value of attribute stores_subdirectory.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def stores_subdirectory @stores_subdirectory end |
#trace ⇒ Object
Returns the value of attribute trace.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def trace @trace end |
#webpack_generated_files ⇒ Object
Returns the value of attribute webpack_generated_files.
103 104 105 |
# File 'lib/react_on_rails/configuration.rb', line 103 def webpack_generated_files @webpack_generated_files end |
Instance Method Details
#setup_config_values ⇒ Object
on ReactOnRails
183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/react_on_rails/configuration.rb', line 183 def setup_config_values check_autobundling_requirements if auto_load_bundle ensure_webpack_generated_files_exists configure_generated_assets_dirs_deprecation configure_skip_display_none_deprecation check_server_render_method_is_only_execjs error_if_using_packer_and_generated_assets_dir_not_match_public_output_path # check_deprecated_settings adjust_precompile_task check_component_registry_timeout validate_generated_component_packs_loading_strategy validate_enforce_private_server_bundles auto_detect_server_bundle_path_from_shakapacker end |