lib/sewing_kit/webpack/dev.rb in sewing_kit-0.95.4 vs lib/sewing_kit/webpack/dev.rb in sewing_kit-0.96.0

- old
+ new

@@ -52,30 +52,44 @@ command_list = [ sewing_kit_bin, 'dev', '--logLevel', log_level, - ] + ].concat(options) if debug_mode? command_list.push(['--debug']) end command_list.join(' ') end def sewing_kit_bin - bin = SewingKit.configuration.dev_server_sewing_kit_bin + heap_size = SewingKit.configuration.development_options[:heap] + heap_config = if heap_size + "node --max-old-space-size=#{heap_size} " + end + + bin = "#{heap_config}#{SewingKit.configuration.dev_server_sewing_kit_bin}" raise NodeSewingKitNotInstalled unless File.exist?(bin) bin end def log_level if SewingKit.configuration.log_level == :inherit log_level_from_rails else SewingKit.configuration.log_level.to_s end + end + + def options + development_options = SewingKit.configuration.development_options + return [] unless development_options + + development_options + .reject { |key| key == :heap } + .map { |key, value| ["--#{key}", value] }.flatten end def log_level_from_rails case Rails.logger.level when 0