lib/lookbook/config.rb in lookbook-1.0.0.beta.4 vs lib/lookbook/config.rb in lookbook-1.0.0.beta.5

- old
+ new

@@ -26,10 +26,11 @@ preview_srcdoc: false, sort_examples: true, listen: Rails.env.development?, listen_paths: [], + listen_extensions: ["rb", "html.*"], listen_use_polling: false, cable_mount_path: "/lookbook-cable", cable_logger: Lookbook.logger, @@ -131,10 +132,16 @@ def listen_paths normalize_paths(@options.listen_paths) end + def listen_extensions + @options.listen_extensions += ["rb", "html.*"] + @options.listen_extensions.uniq! + @options.listen_extensions + end + def parser_registry_path absolute_path(@options.parser_registry_path) end def inspector_panels(&block) @@ -217,10 +224,11 @@ protected def normalize_paths(paths) paths.map! { |path| absolute_path(path) } - paths.select { |path| Dir.exist?(path) } + paths.select! { |path| Dir.exist?(path) } + paths end def absolute_path(path) File.absolute_path(path.to_s, Rails.root) end \ No newline at end of file