PhoenixAssets.Graph.Entry (PhoenixAssets v0.1.0)

View Source

One node in the Phoenix Asset Graph.

Plugins emit entries from PhoenixAssets.Plugin.graph_entries/2. The graph builder collects them, merges the Vite manifest, and writes the combined graph.json plus an optional compiled lookup module.

kind identifies what the entry describes; key is its stable identifier within that kind; data holds the kind-specific payload; source is an optional path to the file a developer would open for this entry.

Summary

Functions

Builds a graph entry from a keyword list or map of attributes.

Types

kind()

@type kind() ::
  :page
  | :route
  | :electric_shape
  | :command
  | :session
  | :pubsub_topic
  | :entry
  | :locale
  | :story
  | atom()

t()

@type t() :: %PhoenixAssets.Graph.Entry{
  data: map(),
  key: String.t(),
  kind: kind(),
  source: String.t() | nil
}

Functions

new(attrs)

@spec new(Enumerable.t()) :: t()

Builds a graph entry from a keyword list or map of attributes.