lib/lookbook/config.rb in lookbook-3.0.0.alpha.0 vs lib/lookbook/config.rb in lookbook-3.0.0.alpha.1
- old
+ new
@@ -35,32 +35,32 @@
inspector_panels: default_inspector_panels,
inspector_preview_panels: [:preview, :output].freeze,
inspector_drawer_panels: [:usage, :params, :metadata, "*"],
inspector_param_inputs: default_inspector_param_inputs,
- sidebar_nav_panels: [:previews, :pages],
-
page_route: "pages",
page_paths: ["test/components/docs"],
page_extensions: ["md", "html.*", "md.*"],
page_watch_paths: [],
page_watch_extensions: [],
page_frontmatter_defaults: default_frontmatter_options,
pages_nav_label: "Pages",
pages_nav_filter: true,
- ui_status_bar: dev?,
+ ui_nav_panels: [:previews, :pages],
+ ui_status_bar: Rails.env.development?,
ui_color_scheme_switcher: true,
markdown_options: default_markdown_options,
languages: default_languages,
- reload_on_change: dev?,
+ reload_on_change: Rails.env.development?,
mount_path: "/lookbook",
- auto_mount: true
+
+ enabled: Rails.env.development? || Rails.env.test?
})
end
def default_inspector_panels
{
@@ -192,30 +192,9 @@
header: true,
landing: false,
data: {}
}
end
-
- private
-
- def dev?
- Rails.env.development?
- end
-
- # def options(opts = {})
- # return opts unless opts.is_a?(Hash)
-
- # opts.transform_values! do |value|
- # if value.is_a?(Hash)
- # options(value)
- # elsif value.is_a?(Array)
- # value.map { options(_1) }
- # else
- # value
- # end
- # end
- # ActiveSupport::OrderedOptions.new.merge!(opts)
- # end
end
class_attribute :current, default: defaults, instance_predicate: false
def initialize