class Components::Assets::JSAsset

Overview

JavaScript asset with processing capabilities

Defined in:

components/assets/base/js_asset.cr

Instance Method Summary

Instance methods inherited from class Components::Assets::Asset

add_dependency(asset_id : String) : Nil add_dependency, content : String content, content=(content : String) content=, content_type : String content_type, dependencies : Array(String) dependencies, fingerprint : String fingerprint, get_metadata(key : String) : String | Nil get_metadata, id : String id, metadata : Hash(String, String) metadata, modified? : Bool modified?, output_filename : String output_filename, process : String process, processed_content : String processed_content, reload : Nil reload, remove_dependency(asset_id : String) : Nil remove_dependency, set_metadata(key : String, value : String) : Nil set_metadata, source_path? : String | Nil source_path?, to_h : Hash(String, JSON::Any) to_h, updated_at : Time updated_at

Constructor methods inherited from class Components::Assets::Asset

new(source_path : String | Nil = nil, content : String = "") new

Instance Method Detail

def add_to_global(name : String) : String #

Add to global scope


[View source]
def content_type : String #
Description copied from class Components::Assets::Asset

Abstract method - must be implemented by subclasses


[View source]
def minify : Bool #

JS-specific options


[View source]
def minify=(minify : Bool) #

JS-specific options


[View source]
def process : String #

Process JavaScript content


[View source]
def source_map : Bool #

[View source]
def source_map=(source_map : Bool) #

[View source]
def target : String #

[View source]
def target=(target : String) #

[View source]
def wrap_iife : String #

Wrap in IIFE (Immediately Invoked Function Expression)


[View source]