- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: preserve non-common prefix parts #177
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 85.88% 85.96% +0.08%
==========================================
Files 7 7
Lines 170 171 +1
Branches 44 44
==========================================
+ Hits 146 147 +1
Misses 24 24
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change.
My one note of caution is that I'm worried the 'skipping' of intermediate path components might confuse people (because they'll need to have a good understanding of how the algorithm works).
I have a slight preference therefore for only omitting consecutive path components because I think that's an easier explanation to make. (#1-3 would be named according to the full path and #4 would remain as-is.)
Having said that, the generated readme.md
does likely address my concern.
We may emit a warning when a mismatch happens and asking to correct it. Only a short and helpful message is needed for solution. |
related #175
Components module, prefixes component name by path until there is a mismatch. For better explanation I've added some examples:
form/layouts/FormLayout.vue
FormLayout
FormLayoutsLayout
my/form/MyFancyButton.vue
MyFancyButton
MyFormFancyButton
field/number/integer/FieldNumberOfServings.vue
NumberIntegerFieldNumberOfServings
FieldNumberIntegerOfServings
ui/notification/NotificationWrapper.vue
UINotificationWrapper
UINotificationWrapper
Cases 1-3 are basically bad usages since prefix used in filename does not matches path. Current behavior is fixing this mismatch by respecting file name and new change is fixing mismatch by respecting full path