Comments (8)
grunt-compare-size
didn't tell jQuery to reuse a an array of file paths... we (jQuery) just did that. https://github.com/jquery/jquery/blob/master/Gruntfile.js#L21-L22 We could just make this it's own list? Or only .js?
from grunt-compare-size.
The more I think about it, the more I actually hate both the jQuery list re-use and the grunt-compare-size assumption that the list item in the list is the gzip item.
from grunt-compare-size.
Yeah i know what you're saying. I would actually be happier if we just reported the gzip size of the min.js file in a one-line compact format, at least that would be short.
from grunt-compare-size.
I'd like to address this by accepting a compressor function in the task options and sending all files through it; output would look something like:
Sizes
9363 gz:2895 tasks/compare-size.js
2687 gz:1139 dist/source.js
305 gz:208 dist/source.min.js
Compared to last run
-4 gz:-3 tasks/compare-size.js
= gz:= dist/source.js
= gz:= dist/source.min.js
@dmethvin, @rwldrn: thoughts?
from grunt-compare-size.
I'd like to see a more compact format. How about this?
Sizes Diff
9363 -4 gz:2895 tasks/compare-size.js
2687 = gz:1139 dist/source.js
305 = gz:208 dist/source.min.js
Also the thing where it compared the size to every branch you have locally was waaaaay too verbose for the case where you're landing lots of other people's stuff. I was getting two screens full of diff info and having to blow away the branch .sizecache often. Perhaps it could use an activity (last commit) date to avoid spamming the console. Or we could just show the min/gz number since that's all we care about on the other branches?
from grunt-compare-size.
Multiple branch verbosity is a separate issue (literally so: gh-15), but regarding this, don't we want size comparisons against both uncompressed and gzipped versions of the files? In jQuery's case it'll be three lines per entry:
Compared to last run
-4 gz:-3 dist/jquery.js
-1 gz:-1 dist/jquery.min.js
Edit: plus three lines for "Sizes", which I now realize is probably what you're trying to avoid:
Sizes
235540 gz:69653 dist/jquery.js
82725 gz:29538 dist/jquery.min.js
from grunt-compare-size.
Yeah, that looks more compact. We could remove the gz: prefix and just make column headers to save a bit more.
from grunt-compare-size.
For reference, this is what the Closure Compiler UI shows:
Original Size: 13.54KB (4.3KB gzipped)
Compiled Size: 6.18KB (2.32KB gzipped)
Saved 54.33% off the original size (46.03% off the gzipped size)
Which is probably closer to what @dmethvin wants (values spread across columns instead of rows).
from grunt-compare-size.
Related Issues (13)
- Less bytes => good, not red
- Docs suck HOT 3
- Go back to multi task HOT 4
- Output is too verbose with multiple branches HOT 4
- Output is double-spaced on Windows HOT 2
- Avoiding really long reports HOT 7
- Problem in Windows 7 64bits HOT 2
- Investigate gzip size accuracy
- Provide a changelog
- Why not add gruntplugin keyword on npm site?
- Still a release candidate?
- Silent failure if git command line not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-compare-size.