module
Components::Integration
Overview
Integration helpers for web frameworks
Defined in:
components/integration.crClass Method Summary
-
.configure_cache(&block : Cache::Configuration -> Nil) : Nil
Configure caching
-
.configure_css(&block : CSS::Config -> Nil) : CSS::Config
Configure CSS system
-
.css_asset(config : CSS::Config | Nil = nil, mode : Symbol = :development, scan_paths : Array(String) = ["./src"]) : Assets::CSSAsset
Generate CSS asset
-
.css_tag(config : CSS::Config | Nil = nil, mode : Symbol = :development, scan_paths : Array(String) = ["./src"]) : String
Helper to include CSS in layouts
-
.reactive_component(component : Component) : String
Helper to wrap a component for reactive updates
-
.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
-
.reactive_script_tag(debug : Bool = false, auto_init : Bool = true, minified : Bool = true) : String
Helper to include reactive JavaScript in layouts
Macro Summary
-
reactive_action(name, &block)
Macro for defining reactive actions in controllers
-
render_component(component_class, **params)
Macro for Amber controllers to easily render components
Class Method Detail
Configure CSS system
def self.css_asset(config : CSS::Config | Nil = nil, mode : Symbol = :development, scan_paths : Array(String) = ["./src"]) : Assets::CSSAsset
#
Generate CSS asset
def self.css_tag(config : CSS::Config | Nil = nil, mode : Symbol = :development, scan_paths : Array(String) = ["./src"]) : String
#
Helper to include CSS in layouts
Helper to wrap a component for reactive updates
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
def self.reactive_script_tag(debug : Bool = false, auto_init : Bool = true, minified : Bool = true) : String
#
Helper to include reactive JavaScript in layouts
Macro Detail
macro render_component(component_class, **params)
#
Macro for Amber controllers to easily render components