UNPKG

@tylertech/forge-upgrade

Version:

Automated upgrade utility for the Tyler Forge™ based projects.

13 lines (11 loc) 384 B
import matchHelper from 'posthtml-match-helper'; import parseAttrs from 'posthtml-attrs-parser'; export default function transform(tree) { tree.match(matchHelper('.forge-typography'), node => { const el = node; let attrs = parseAttrs(el.attrs); attrs.class = attrs.class.filter(a => a !== 'forge-typography'); node.attrs = attrs.compose(); return node; }); }