module Coco module IntegrationHelper def coco_stylesheet_tag(context = "coco", dev: ENV["COCO_PATH"], **) stylesheet_link_tag("coco#{"/dev" if dev}/#{context}", **) end def coco_stylesheet_file_path(...) IntegrationHelper.stylesheet_file_path(...) end def coco_javascript_file_path(...) IntegrationHelper.javascript_file_path(...) end def coco_tailwind_preset_path(...) IntegrationHelper.tailwind_preset_path(...) end class << self def stylesheet_file_path(context = "coco", dev: ENV["COCO_PATH"], **opts) File.join(Coco::Engine.root, "app/assets/build/coco#{"/dev" if dev}/#{context}.css") end def javascript_file_path(context = "coco", dev: ENV["COCO_PATH"], **opts) File.join(Coco::Engine.root, "app/assets/build/coco#{"/dev" if dev}/#{context}.js") end def tailwind_preset_path File.join(Coco::Engine.root, "app/assets/build/coco/tailwind.preset.js") end end end end