lib/lookbook/stores/config_store.rb in lookbook-1.2.1 vs lib/lookbook/stores/config_store.rb in lookbook-1.3.0
- old
+ new
@@ -12,17 +12,19 @@
def project_name=(name)
store[:project_name] = name == false ? nil : name
end
def page_paths=(paths = nil)
- store[:page_paths] ||= []
- store[:page_paths] += paths.to_a
+ store[:page_paths].push(*paths.to_a)
end
+ def page_extensions=(extensions = nil)
+ store[:page_extensions].push(*extensions.to_a).uniq!
+ end
+
def preview_paths=(paths = nil)
- store[:preview_paths] ||= []
- store[:preview_paths] += paths.to_a
+ store[:preview_paths].push(*paths.to_a)
end
def preview_display_params
Lookbook.logger.warn "The `preview_display_params` config option has been renamed to `preview_display_options` and will be removed in v2.0"
store[:preview_display_options]
@@ -32,16 +34,13 @@
Lookbook.logger.warn "The `preview_display_params` config option has been renamed to `preview_display_options` and will be removed in v2.0"
store[:preview_display_options] = options.to_h
end
def listen_extensions=(extensions = nil)
- store[:listen_extensions] ||= []
- store[:listen_extensions] += extensions.to_a
- store[:listen_extensions].uniq!
+ store[:listen_extensions].push(*extensions.to_a).uniq!
end
def markdown_options=(options = nil)
- store[:markdown_options] ||= {}
store[:markdown_options].merge!(options.to_h)
end
def ui_theme=(name)
name = name.to_s