Closed davidperezgar closed 1 month ago
I like the idea 👍
I think we could add this with a debug line though, e.g.
$size = (int) filesize( $archive_absolute_filepath );
WP_CLI::debug( "File size: {$filesize}", 'dist-archive' );
It would need a util à la size_format()
in core though. From what I can see, we have a similar util in db-command at the moment:
We could make that util reusable and move it to https://github.com/wp-cli/wp-cli/blob/a177d5aa6ca228b90eb553b710b96b8fabc14a81/php/utils.php
Thanks! But I'd add without debug mode, as you can see when the zip is created.
Thanks! But I'd add without debug mode, as you can see when the zip is created.
I agree. Size of zip would be very useful information generating the zip.
Feature Request
Show the size of the zip file after finished. That helps to know if you forget to ignore a big folder like
node_modules
or you'd like to optimize the size of the zip for several reasons.Describe the solution you'd like It could be something like this:
Success: Created plugin-1.0.0.zip Size: 1,2MB
or even without the word size:
Success: Created 1,2MB plugin-1.0.0.zip