inject

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL