Module: Coco::IntegrationHelper

Included in:
Helpers
Defined in:
app/helpers/coco/integration_helper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.javascript_file_path(dev: ENV["COCO_PATH"], **opts) ⇒ Object



24
25
26
# File 'app/helpers/coco/integration_helper.rb', line 24

def javascript_file_path(dev: ENV["COCO_PATH"], **opts)
  File.join(Coco::Engine.root, "app/assets/build/coco#{"/dev" if dev}/coco.js")
end

.stylesheet_file_path(dev: ENV["COCO_PATH"], **opts) ⇒ Object



20
21
22
# File 'app/helpers/coco/integration_helper.rb', line 20

def stylesheet_file_path(dev: ENV["COCO_PATH"], **opts)
  File.join(Coco::Engine.root, "app/assets/build/coco#{"/dev" if dev}/coco.css")
end

.tailwind_preset_pathObject



28
29
30
# File 'app/helpers/coco/integration_helper.rb', line 28

def tailwind_preset_path
  File.join(Coco::Engine.root, "app/assets/build/coco/tailwind.preset.js")
end

Instance Method Details

#coco_javascript_file_pathObject



11
12
13
# File 'app/helpers/coco/integration_helper.rb', line 11

def coco_javascript_file_path(...)
  IntegrationHelper.javascript_file_path(...)
end

#coco_stylesheet_file_pathObject



7
8
9
# File 'app/helpers/coco/integration_helper.rb', line 7

def coco_stylesheet_file_path(...)
  IntegrationHelper.stylesheet_file_path(...)
end

#coco_stylesheet_tag(dev: ENV["COCO_PATH"]) ⇒ Object



3
4
5
# File 'app/helpers/coco/integration_helper.rb', line 3

def coco_stylesheet_tag(dev: ENV["COCO_PATH"], **)
  stylesheet_link_tag("coco#{"/dev" if dev}/coco", **)
end

#coco_tailwind_preset_pathObject



15
16
17
# File 'app/helpers/coco/integration_helper.rb', line 15

def coco_tailwind_preset_path(...)
  IntegrationHelper.tailwind_preset_path(...)
end