Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteDOT ¶
func WriteDOT(w io.Writer, report *GraphReport)
WriteDOT writes the graph report in Graphviz DOT format.
func WriteJSON ¶
func WriteJSON(w io.Writer, report *GraphReport) error
WriteJSON writes the graph report as machine-readable JSON.
func WriteText ¶
func WriteText(w io.Writer, report *GraphReport)
WriteText writes the graph report in human-readable text format.
Types ¶
type ActionInfo ¶
type ActionInfo struct {
Type string `json:"type"` // "create", "inject", "append"
Target string `json:"target"` // output file path (raw frontmatter value)
Marker string `json:"marker,omitempty"` // for inject actions
Position string `json:"position,omitempty"` // "after" or "before"
}
ActionInfo describes a file operation performed by a generator template.
type BundleInfo ¶
type BundleInfo struct {
Name string `json:"name"`
Order []string `json:"order"` // generator names in execution order
ValidOrder bool `json:"valid_order"` // true if create-before-inject respected
}
BundleInfo describes a bundle and its generator execution order.
type GeneratorNode ¶
type GeneratorNode struct {
Name string `json:"name"`
Actions []ActionInfo `json:"actions"`
}
GeneratorNode represents a single generator and its file actions.
type GraphReport ¶
type GraphReport struct {
Generators []GeneratorNode `json:"generators"`
Bundles []BundleInfo `json:"bundles"`
Markers []MarkerInfo `json:"markers"`
Warnings []Warning `json:"warnings"`
}
GraphReport holds the full generator dependency analysis result.
func Analyze ¶
func Analyze(root string) (*GraphReport, error)
Analyze scans a template directory and returns a GraphReport describing the dependency graph between generators, files, and injection markers.
Click to show internal directories.
Click to hide internal directories.