GithubHelp home page GithubHelp logo

Comments (7)

gibson042 avatar gibson042 commented on July 3, 2024

I'll leave this open to see what we can do about sorting, but in the meantime you'll want grunt compare_size:prune:master:1.x-master, which is already working.

from grunt-compare-size.

rwaldron avatar rwaldron commented on July 3, 2024

@gibson042 what do you think about having a grunt compare_size:minimal that jQuery can use for the watch task? Something that only does a comparison against master, but doesn't display the numbers from master...

Instead of:

Running "compare_size:files" (compare_size) task
   raw     gz Sizes                                                            
240615  71240 dist/jquery.js                                                   
 83018  29411 dist/jquery.min.js                                               

   raw     gz Compared to last run                                             
     =      = dist/jquery.js                                                   
     =      = dist/jquery.min.js

Something like...

...where the diff is against master.

@dmethvin noted that it would still be nice to have a way to specify the one branch to compare to...

possibly via command?

grunt compare_size:minimal:vs:1.x-master

This is all just for brainstorming

from grunt-compare-size.

gibson042 avatar gibson042 commented on July 3, 2024

This is actually pretty easy if we can restrict the scope to a single file. @dmethvin, would this suit your purposes?

Running compare_size:file:dist/jquery.min.js:1.x-master:master
   raw     gz
 82971  29391 dist/jquery.min.js
-10202  -3364 1.x-master @ 039d9eec4c44214415d59e598b94826476271d15
   +19    +52 master @ a120bbbfae81daccf801fcf8deb0bc77d865e27f

from grunt-compare-size.

rwaldron avatar rwaldron commented on July 3, 2024

Can I make one nit? The sha is sort of crowding the output, would it be ok to format it like this:

Running compare_size:file:dist/jquery.min.js:1.x-master:master
      raw     gz
    82971  29391 dist/jquery.min.js
   -10202  -3364 1.x-master         @ 039d9eec4c44214415d59e598b94826476271d15
      +19    +52 master             @ a120bbbfae81daccf801fcf8deb0bc77d865e27f

If that's an unnecessary pain in the ass, then don't worry about it :)

from grunt-compare-size.

dmethvin avatar dmethvin commented on July 3, 2024

I like that better as well, or could the sha be abbreviated?

from grunt-compare-size.

dmethvin avatar dmethvin commented on July 3, 2024

Also, even if you add "last run" or the last few branches to that list, it's a lot more compact than what we have now. So it's a big 👍 from me.

from grunt-compare-size.

gibson042 avatar gibson042 commented on July 3, 2024

Single file comparison example (double colon is required so the file isn't misinterpreted as a multiTask target):

$ grunt compare_size::dist/jquery.min.js
Running "compare_size:files:dist/jquery.min.js" (compare_size) task
   raw     gz                                                                  
 82971  29391 dist/jquery.min.js                                               
     =      = master @ 0afc92bd73a61a0279a419647458e6ed89638ae0                
-10244  -3354 1.x-master @ fdaf2146adae861ed3c3a42f0044e589e9d86afd            
     =      = last run                                                         

Done, without errors.

from grunt-compare-size.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.