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

Add tool to compare bundle sizes #328

Merged
merged 2 commits into from
Oct 4, 2019
Merged

Add tool to compare bundle sizes #328

merged 2 commits into from
Oct 4, 2019

Conversation

kobawan
Copy link
Contributor

@kobawan kobawan commented Oct 4, 2019

Description

It is possible now to compare local bundle size vs last build.

Type

  • Breaking change
  • Enhancement
  • Fix
  • Documentation
  • Tooling

Screenshot 2019-10-04 at 10 11 07

@kobawan kobawan added enhancement chore Anything not involving production features 3.0 3.0 roadmap labels Oct 4, 2019
@kobawan kobawan self-assigned this Oct 4, 2019
@kobawan kobawan changed the base branch from master to 3.0-version October 4, 2019 08:10
@clementFrancon clementFrancon self-requested a review October 4, 2019 11:57
Copy link
Contributor

@clementFrancon clementFrancon left a comment

Choose a reason for hiding this comment

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

Few comments otherwise great job ;)

@@ -25,7 +25,9 @@
"main": "dist/vast-client-node.min.js",
"browser": "dist/vast-client.min.js",
"scripts": {
"prebuild": "rm -rf dist_old && mkdir dist_old && cp -a dist/. dist_old/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Not windows (cmd) proof I think but I'm not sure if it's actually a problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how I would make it work on both windows and mac 🤔 is it ok if I leave it as is?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's ok like that, there is still ways for windows users to use it, so install the bash from "windows features" (from what I quickly checked on the internet) or use Git bash (what I do)

bundleSize.js Outdated
const newSize = newValues[name];
const delta = newSize - size;
const sizeColorFg = delta <= 0 ? '\x1b[32m' : '\x1b[31m';
const reset = '\x1b[0m';
Copy link
Contributor

Choose a reason for hiding this comment

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

I spent some minutes try to figure out what this reset variable stood for, It's maybe only because I'm not used to manipulate colors in console outputs but maybe a naming like "resetColorFg" or something like this would helped me a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure I can rename it

Copy link
Contributor

@clementFrancon clementFrancon left a comment

Choose a reason for hiding this comment

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

LGTM !

@kobawan kobawan merged commit 262a973 into 3.0-version Oct 4, 2019
@kobawan kobawan deleted the bundle-size branch October 4, 2019 13:00
@kobawan kobawan added the hacktoberfest Participate in 2019's hacktoberfest! label Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 3.0 roadmap chore Anything not involving production features enhancement hacktoberfest Participate in 2019's hacktoberfest!
Development

Successfully merging this pull request may close these issues.

2 participants