-
Notifications
You must be signed in to change notification settings - Fork 85
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
Size limit support #691
Size limit support #691
Conversation
The docs are all located here and get published to Per #690
IMO, I don't think a system-wide size-limit would really provide a whole lot of value. This is one of the reasons we went with a % increase approach since that would take into account the baseline complexities of each component. With 1 global upper-bound, components like a I think a per-component size limit would be right way to go about this. |
@adierkens Updated to support package-specific size limits! It still supports global limits, but yeah I don't see that being used often. Feel free to re-review. In order to support package-local configuration I needed to refactor the cc. @yucho |
@@ -1,4 +1,5 @@ | |||
import { monorepoName, createLogger } from '@design-systems/cli-utils'; | |||
import { cosmiconfigSync as load } from 'cosmiconfig'; |
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.
💡 would prefer to use @design-systems/load-config
here, but trying to link that resulted in a weird circular dependency issue that broke installation (see previous build). Got tired of fighting with that, but if someone else wants to tackle that optimization then by all means.
Thanks for the approval @kelyvin! Can you hold off on merging for the time being? I have been meaning to attach a demo to this PR, and IIRC I was having difficulty that suggested this feature wasn't working. I need to carve out some time to revisit this. I'll nudge you when this is ready. |
What Changed
fixes #690
Adds a new option for
ds size
that enables enforcement of a limit on component bundles. Refactors thesize
plugin significantly in order to support locally-scoped configuration options, namely, thesizeLimit
option.Why
I'm building a new Design System component and want to enforce a limit on the component as a whole, rather than simply on incoming changesets
Todo:
gh-pages
branch. What's the process for adding to that? Just a separate PR togh-pages
?📦 Published PR as canary version:
4.14.1--canary.691.19342.0
✨ Test out this PR locally via: