Documentation
¶
Overview ¶
Package inject provides the inject command for mappa.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{
Use: "inject",
Short: "Trace HTML files and inject import maps in-place",
Long: `Trace HTML files and update their import map script tags in-place.
For each file, traces module imports to generate a minimal import map,
merges with any existing manual imports (traced imports take precedence),
and writes the result back to the file.`,
Example: ` # Inject import maps into all HTML files
mappa inject --glob "_site/**/*.html"
# Custom URL template
mappa inject --glob "_site/**/*.html" --template "/assets/packages/{package}/{path}"
# Parallel processing with custom worker count
mappa inject --glob "_site/**/*.html" -j 8
# Dry run to see what would change
mappa inject --glob "_site/**/*.html" --dry-run`,
RunE: run,
}
Cmd is the inject cobra command that traces HTML files and updates their import map script tags in-place with per-file minimal import maps.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.