A platform for community discussion. Free, open, simple.
DEV: Clear local stylesheet caches when working on WCAG color schemes (#16600)
Penar Musaraj02fafc9476d8
diff --git a/lib/stylesheet/watcher.rb b/lib/stylesheet/watcher.rbindex f16642f7ea4..3e474f13a33 100644--- a/lib/stylesheet/watcher.rb+++ b/lib/stylesheet/watcher.rb@@ -70,7 +70,7 @@ module Stylesheetendtarget = nil- target_match = long.match(/admin|desktop|mobile|publish|wizard/)+ target_match = long.match(/admin|desktop|mobile|publish|wizard|wcag|color_definitions/)if target_match&.lengthtarget = target_match[0]end@@ -93,6 +93,11 @@ module Stylesheetenddef core_assets_refresh(target)+ if target.match(/wcag|color_definitions/)+ Stylesheet::Manager.clear_color_scheme_cache!+ return+ end+targets = target ? [target] : ["desktop", "mobile", "admin"]Stylesheet::Manager.clear_core_cache!(targets)message = targets.map! do |name|