Module: Roda::RodaPlugins::AssetsManifest::ClassMethods
- Defined in:
- lib/roda/plugins/assets_manifest.rb
Instance Method Summary collapse
- #assets_version ⇒ Object
- #css_entrypoint_tag(entrypoint) ⇒ Object
- #js_entrypoint_tag(entrypoint) ⇒ Object
Instance Method Details
#assets_version ⇒ Object
72 |
# File 'lib/roda/plugins/assets_manifest.rb', line 72 def assets_version = opts[:assets_version] |
#css_entrypoint_tag(entrypoint) ⇒ Object
83 84 85 86 87 88 89 90 |
# File 'lib/roda/plugins/assets_manifest.rb', line 83 def css_entrypoint_tag(entrypoint) Roda::RodaPlugins::AssetsManifest::CSS_ENTRYPOINT_TAG_CACHE[entrypoint] ||= if opts[:assets_manifest_is_production] "<link rel=\"stylesheet\" href=\"#{opts[:assets_manifest_host_production]}/#{opts[:assets_manifest]["#{entrypoint}.css"]}\" />" else "<link rel=\"stylesheet\" href=\"#{opts[:assets_manifest_host_development]}/#{entrypoint}.css\" />" end end |
#js_entrypoint_tag(entrypoint) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/roda/plugins/assets_manifest.rb', line 74 def js_entrypoint_tag(entrypoint) Roda::RodaPlugins::AssetsManifest::JS_ENTRYPOINT_TAG_CACHE[entrypoint] ||= if opts[:assets_manifest_is_production] "<script type=\"module\" src=\"#{opts[:assets_manifest_host_production]}/#{opts[:assets_manifest]["#{entrypoint}.js"]}\"></script>" else "<script type=\"module\" src=\"#{opts[:assets_manifest_host_development]}/#{entrypoint}.js\"></script>" end end |