Documentation
¶
Overview ¶
Command classmap renames classes through a mapping, the way a CSS-modules build does.
classmap -map classes.json < page.html > out.html
The mapping is JSON, original name to generated name. A class with no entry is left alone and reported, because a page referring to a class the stylesheet no longer defines is a bug worth seeing rather than a silent no-op.
One pass is enough, and the reason is worth naming: selectors are matched against the document as it arrived, so renaming a class cannot trigger a rule keyed on the new name. There is no cascade to worry about, and no chance of a rename renaming itself.
Click to show internal directories.
Click to hide internal directories.