Volt.JS.Asset (Volt v0.14.12)

Copy Markdown View Source

Compatibility accessors for JavaScript and TypeScript support assets bundled with Volt.

Summary

Functions

Read a support asset, emit browser JavaScript, and cache static modules.

Emit browser JavaScript after binding OXC $placeholder literals.

Path to the priv/ts directory containing bundled TypeScript assets.

Functions

compiled!(filename)

@spec compiled!(String.t()) :: String.t()

Read a support asset, emit browser JavaScript, and cache static modules.

compiled_template!(filename, bindings)

@spec compiled_template!(String.t(), keyword() | map()) :: String.t()

Emit browser JavaScript after binding OXC $placeholder literals.

path_for(filename)

@spec path_for(String.t()) :: String.t()

priv_dir()

@spec priv_dir() :: String.t()

Path to the priv/ts directory containing bundled TypeScript assets.

read!(filename)

@spec read!(String.t()) :: String.t()