google / postcss-rename

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

Allow by-part and by-whole renaming configurable separately from renaming type #16

Closed nex3 closed 4 years ago

nex3 commented 4 years ago

Currently, all the built-in renaming types other than NONE do "by-part renaming": they rename each hyphenated component of a class name individually (as opposed to "by-whole renaming", which renames the entire class). Rather than baking this in to particular renaming types, I think we should have a byPart: boolean configuration option for it that's orthogonal to the renaming type.

I also think this option should default to false. While by-part renaming is common within Google, it generally produces more bytes of output for relatively little value for new users. I think most people would prefer by-whole renaming.