Skip to content

Conversation

@jakub300
Copy link
Collaborator

@jakub300 jakub300 commented Jun 7, 2018

Fixes #325

@jakub300 jakub300 changed the title WIP: Add Bundle Report Add Bundle Report Aug 16, 2018
@jakub300
Copy link
Collaborator Author

Hey, this is ready. It adds two commands yarn report and yarn build-report.

@arturkot
Copy link
Contributor

Hi,

I like this addition! Just wondering if we need yarn report – it seems to show what's currently in dist: might be unminified dev files or unminified + the last build (could be out of date). Seems to be a bit confusing IMHO. yarn build-report, on the other hand, is what I really want. The size of production ready files. Perhaps we should leave just yarn build-report command?

@jakub300
Copy link
Collaborator Author

Done

Copy link
Contributor

@arturkot arturkot left a comment

Choose a reason for hiding this comment

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

👍

"build-report": "gulp build && gulp report",
"dev": "gulp",
"lint": "gulp lint-js && gulp lint-css",
"report": "gulp report",
Copy link
Contributor

Choose a reason for hiding this comment

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

Well, that was quick. 😅

const os = require('os');
const opn = require('opn');

const MEBIBYTE = 1024 * 1024;
Copy link
Contributor

Choose a reason for hiding this comment

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

MEGABYTE? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wanted to be precise, mega while more often used is confusing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. Should've asked Google before writing. ;) https://en.wikipedia.org/wiki/Mebibyte


Object.keys(files)
.sort()
.forEach(link => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Maybe .map instead of pushing using forEach? You could return a string with tr. A bit less writing. Unless I missed something. 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, done.

@jakub300 jakub300 merged commit d62620e into xfiveco:master Sep 6, 2018
@jakub300 jakub300 deleted the bundle-report branch September 6, 2018 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants