intuit / intuit/design-systems-cli
Add support for component size limits
- Dominant language
- TypeScript
- Stars
- 419
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I want to define a perf budget in the form of a maximum component size. `ds size` allows me to set thresholds for _changesets_, but not for a component totally.
**Describe the solution you'd like**
The `ds size` command presently only considers the diff in size between the current changeset and the current release. I believe that with some minimal changes, we should be able to support a size limit for components.
It would be ideal to be able to specify a size limit on a component-by-component basis. I'm super new to this codebase, but it seems like `ds.config` is system-wide. If it's possible to make component-specific configurations, then exposing a `size.limit` configuration for a given component that is enforced by `ds size` would be great. Barring that, setting a `size.limit` for all components should be feasible as well.
**Describe alternatives you've considered**
- `ds size` will can result in a report being added to Pull Requests via comments. It's possible to enforce a size limit by refusing to approve PRs where a limit is surpassed. ie. team norms
- Possible to author instrumentation that parses output of `ds size` and fails if a limit is surpassed
**Additional context**
:wave:
Contributor guide
Assessment
This issue has not been assessed yet.