google / postcss-rename

Replace class names based on a customizable renaming scheme.
Apache License 2.0
131 stars 18 forks source link

Port SubstitutionMapProvider, RenamingType, and OutputRenamingMapFormat #7

Closed rzhw closed 4 years ago

rzhw commented 4 years ago

Porting SubstitutionMapProvider allows custom substitution maps to be provided, if the PostCSS plugin options are modified to accept them. For example, imagine a substitutionMapProvider plugin option that accepts a concrete implementation. Currently users must use one of the preset substitution maps, but they could supply one of their own so long as it implements the interface.

Porting RenamingType updates the renamingType PostCSS plugin option to match Closure Stylesheet's behavior.

OutputRenamingMapFormat was already ported, but following how RenamingType was ported, it's modified to behave more like its Java predecessor.