module Components::Integration

Overview

Integration helpers for web frameworks

Defined in:

components/integration.cr

Class Method Summary

Macro Summary

Class Method Detail

def self.configure_cache(&block : Cache::Configuration -> Nil) : Nil #

Configure caching


[View source]
def self.configure_css(&block : CSS::Config -> Nil) : CSS::Config #

Configure CSS system


[View source]
def self.css_asset(config : CSS::Config | Nil = nil, mode : Symbol = :development, scan_paths : Array(String) = ["./src"]) : Assets::CSSAsset #

Generate CSS asset


[View source]
def self.css_tag(config : CSS::Config | Nil = nil, mode : Symbol = :development, scan_paths : Array(String) = ["./src"]) : String #

Helper to include CSS in layouts


[View source]
def self.reactive_component(component : Component) : String #

Helper to wrap a component for reactive updates


[View source]
def self.reactive_handler(websocket_path : String = "/components/ws", action_path : String = "/components/action", enable_fallback : Bool = true) : Reactive::ReactiveHandler #

Create and configure a ReactiveHandler for the middleware pipeline


[View source]
def self.reactive_script_tag(debug : Bool = false, auto_init : Bool = true, minified : Bool = true) : String #

Helper to include reactive JavaScript in layouts


[View source]

Macro Detail

macro reactive_action(name, &block) #

Macro for defining reactive actions in controllers


[View source]
macro render_component(component_class, **params) #

Macro for Amber controllers to easily render components


[View source]