Discovery & Assets¶
File discovery for .pjx templates and the registry-wide asset listing used by build tooling.
Internal modules
Nothing on this page is part of the public API — none of it appears in
pyjinhx.__all__, and the module paths may change. It is documented because build
scripts have no public equivalent today.
walk_templates¶
The .pjx files under template_dir, nested ones included, sorted by path. See Template Discovery for the full description and TemplateCandidate fields.
build_registry¶
Walk template_dir and publish a fresh tag → class registry. See Template Discovery.
get_class¶
The component class registered for tag_name, or None. See Template Discovery.
register_class¶
Publish cls under tag_name unless the tag already has an owner. The one way a tag is claimed after the import-time build — used by component() to register a classless wrapper on demand. A tag that is already owned is left alone: a class registered this way never shadows a declared one; the loser is logged, not silently dropped.
get_template_dir¶
The directory the last successful build_registry walked, or None if it hasn't run yet.
all_assets¶
Every CSS and JS path declared by any component class, registry-wide rather than session-scoped: a class contributes its assets whether or not it was rendered. Only classes imported by the time of the call are visible — import the component package before calling this from a build script.
Returns: The CSS paths then the JS paths, each deduped and in path-sorted order so repeated calls and repeated builds agree byte for byte.
See also Assets API for the per-request asset emission functions.