Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dist-size

NPM version NPM downloads CircleCI donate

preview

Install

yarn global add dist-size
# or
npm i -g dist-size

Usage

# 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`

API

const distSize = require('dist-size')

distSize({
  baseDir,
  extensions,
  limit,
  sort
}).then(res => {
  for (const file of res) {
    console.log(file)
    //=>
    {
      name,
      path,
      size,
      gzip
    }
  }
})

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

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

About

Print the size of files in a directory

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages