A minimal script that provides build sizes to assist with optimization.
MIT License
Bot releases are visible (Hide)
--loader
or -l
flag.Published by benelan over 1 year ago
Published by benelan over 2 years ago
Published by benelan over 2 years ago
Published by benelan over 2 years ago
getFileSizes
function. getFiles
now returns a size property-f
or --filetype
flag when specifying a main bundle filetype from the CLI (previously was the second CLI argument)formatBytes
function. Base 10 is what operating systems use in file explorers-h
or --help
flag for usage info)-d
and --decimals
CLI flags for specifying decimals places when formatting bytes-b
and --binary
CLI flags for converting bytes to a human readable format in base 2-o
and --outfile
CLI flags for saving the build size data to CSVdu
)build-sizes
formatting that is logged to the consolesaveBuildSizes
: saves build-sizes
data to CSVgetFileSizeGzip
: calculates a file's gzipped size (with zlib defaults)getFileSizeBrotli
: calculates a file's brotli compressed size (with zlib defaults)mainBundleSizeGzip
(from getBuildSizes
): main bundle's gzipped sizemainBundleSizeBrotli
from getBuildSizes
): main bundle's brotli compressed sizebuildSizeOnDisk
(from getBuildSizes
): build's on-disk size (NaN
on windows since it uses a unix command)size
(from getFiles
): file's uncompressed byte sizePublished by benelan over 2 years ago
Publishing to get the jsdoc on the npm page
Published by benelan over 2 years ago
Published by benelan over 2 years ago
filterFilesByType
and getFileSizes
functionsPublished by benelan over 2 years ago
formatBytes
and getFiles
functionsPublished by benelan over 2 years ago
Doc and code clean up. Fixed some typos and unclear explanations.
Published by benelan over 2 years ago
samplePath
parameter property. buildPath
is now the path from the current working directory (which used to be samplePath
's default value)getBuildSizes