Volt.HMR.StyleGraph (Volt v0.19.4)

Copy Markdown View Source

ETS-backed stylesheet dependency graph for HMR invalidation.

The graph stores resolved stylesheet dependencies and reverse dependent links. Dependency discovery belongs to Volt.CSS.Dependencies; this module only owns the dev-server state needed to invalidate and hot-update stylesheets when an imported stylesheet or referenced asset changes.

Summary

Functions

Clear the entire graph.

Clear stylesheet edges belonging to one session.

Create the stylesheet graph ETS table. Called once from Application.start/2.

Return direct resolved dependencies for a stylesheet source file.

Return all transitive stylesheets that depend on a source file.

Remove a stylesheet from the graph.

Update resolved dependencies for a stylesheet source file.

Functions

clear()

@spec clear() :: :ok

Clear the entire graph.

clear_session(session)

Clear stylesheet edges belonging to one session.

create_table()

@spec create_table() :: :ok

Create the stylesheet graph ETS table. Called once from Application.start/2.

dependencies_of(path, session \\ :default)

Return direct resolved dependencies for a stylesheet source file.

dependents(path, session \\ :default)

Return all transitive stylesheets that depend on a source file.

remove(path, session \\ :default)

Remove a stylesheet from the graph.

update(path, dependencies, session \\ :default)

Update resolved dependencies for a stylesheet source file.