mix mishka.css.closure (Mishka CMS Core v0.0.1)

Copy Markdown View Source

Prints which globally-installed components a site can actually reach, and what that saves.

A UI kit is installed once and shared, so its components live in one directory that the CSS compiler globs wholesale. This walks the reference graph from a site's own templates instead and reports the difference — read-only, so it is safe to run against production data.

Usage

mix mishka.css.closure                 # every site
mix mishka.css.closure --site localhost

Reading the output

unbounded means a reached template names a component in a way no build-time walk can resolve — an expression in component_name={…}, or a call handing an expression to an attribute a component names one through. That site keeps the full glob; the templates responsible are logged so they can be rewritten to literals if the saving is wanted.

A component that names one through its own attribute — component_name={@card} — is printed with the names that attribute takes, its default and what the reached callers write for it:

doc-workspace-list.card -> nothing

See MishkaCmsCore.Runtime.Compilers.CssClosure, whose moduledoc lists every reference it cannot resolve.