yarn global add dist-size
# or
npm i -g dist-size# print file sizes for `./dist` folder
dist-size
# or anywhere
dist-size ./path/to/folder
# or custom extensions
dist-size -e ts
# defaults to `js,css`const distSize = require('dist-size')
distSize({
baseDir,
extensions,
limit,
sort
}).then(res => {
for (const file of res) {
console.log(file)
//=>
{
name,
path,
size,
gzip
}
}
})- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
dist-size © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).
github.com/egoist · GitHub @EGOIST · Twitter @_egoistlily
