class
Components::Assets::AssetManager
- Components::Assets::AssetManager
- Reference
- Object
Overview
Manages all assets in the pipeline
Defined in:
components/assets/asset_manager.crConstructors
Instance Method Summary
-
#asset_url(path : String) : String
Get asset URL for templates
-
#assets : Hash(String, Asset)
Registered assets
-
#build : Nil
Build all assets to output directory
-
#clear : Nil
Clear all assets
-
#css_assets : Array(CSSAsset)
Get all CSS assets
-
#development : Bool
Development mode flag
-
#development=(development : Bool)
Development mode flag
-
#get(id : String) : Asset | Nil
Get an asset by ID
-
#get_by_path(path : String) : Asset | Nil
Get asset by source path
-
#image_assets : Array(ImageAsset)
Get all image assets
- #javascript_include_tags : String
-
#js_assets : Array(JSAsset)
Get all JS assets
-
#manifest : Hash(String, String)
Asset manifest for production
-
#output_dir : String
Output directory
-
#output_dir=(output_dir : String)
Output directory
-
#precompile(directory : String, pattern : String = "**/*") : Nil
Precompile assets from directory
-
#process_all : Nil
Process all assets
-
#register(asset : Asset) : String
Register an asset
-
#register_file(path : String) : String | Nil
Register an asset from file
-
#stylesheet_link_tags : String
Generate asset tags for HTML
-
#watch : Nil
Watch for file changes
-
#watch_paths : Array(String)
Asset paths to watch
Constructor Detail
Instance Method Detail
def precompile(directory : String, pattern : String = "**/*") : Nil
#
Precompile assets from directory