Skip to content
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

feat(@angular/cli): Ability to specify budgets for your apps #8939

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

Brocco
Copy link
Contributor

@Brocco Brocco commented Dec 19, 2017

Closes #7139

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round.

};
}
if (budget.maximumError) {
thresholds = { ...thresholds,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make a copy of thresholds instead of just adding a new property? This is confusing to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Immutability habit, updated.

}

budgets.map(budget => {
const thresholds = this.calcualteThresholds(budget);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calcualte here and below.

*/
export type BudgetType = 'all' | 'allScript' | 'any' | 'anyScript' | 'bundle' | 'initial';

export interface Budget {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reuse the config .d.ts for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, those values aren't exported separately. I could do it by hand, but when it gets regenerated it would get lost.


## NOTES

All sized are relative to baseline.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo? It seems like this was meant to read "All sizes are relative to baseline".

@Brocco Brocco force-pushed the budgets branch 2 times, most recently from a945c12 to bb4be8c Compare January 10, 2018 19:08
hansl
hansl previously approved these changes Jan 11, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting of budget of bundle sizes
4 participants