Closed eschoeffler closed 3 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
Looking at Closure Compiler, it seems like skipped names are applied prior to splitting, and not after.
Running Closure Stylesheets (the .jar here) seems to also replicate this, for example for a test.css containing:
.container, .full-height, .image.full-width {
color: #000;
}
If we run Closure Stylesheets we get:
> java -jar ~/Downloads/closure-stylesheets.jar test.css --rename CLOSURE --excluded-classes-from-renaming full
.a,.b-c,.d.b-e{color:#000}
> java -jar ~/Downloads/closure-stylesheets.jar test.css --rename CLOSURE --excluded-classes-from-renaming full-height
.a,.full-height,.b.c-d{color:#000}
Can I confirm what behavior/config we're trying to align with?
The goal is to align with the behavior used by Google's module set server. Google's module set server applies the skiplist to parts in addition to the whole. While this could be addressed in Google specific code, BY_PART renaming is primarily a Google use case, and so we should use Google's module set server renaming patterns as the canonical standard in this library.
Thanks for clarifying!
When renaming by part, skip renaming parts that are in the except list of cssnames. This aligns renaming behavior with the was Google's module set server does renaming.