Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork15
Display the size of your project
License
sindresorhus/gulp-size
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Display the size of your project
Logs out the total size of files in the stream and optionally the individual file-sizes.
npm install --save-dev gulp-size
importgulpfrom'gulp';importsizefrom'gulp-size';exportdefault()=>(gulp.src('fixture.js').pipe(size()).pipe(gulp.dest('dist')));
Type:object
Type:string
Default:''
Give it a title so it's possible to distinguish the output of multiple instances logging at once.
Type:boolean
Default:false
Displays the gzipped size.
Type:boolean
Default:false
Displays the brotli compressed size.
Type:boolean
Default:false if either of gzip or brotli istrue, otherwisetrue
Displays the uncompressed size.
Type:boolean
Default:true
Displays prettified size:1337 B →1.34 kB.
Type:boolean
Default:false
Displays the size of every file instead of just the total size.
Type:boolean
Default:true
Displays the total of all files.
Type:number
Example:12423000
The total size of all files in bytes.
Type:string
Example:14 kB
Prettified version of.size.
You could, for example, use this to report the total project size withgulp-notify:
importgulpfrom'gulp';importsizefrom'gulp-size';importnotifyfrom'gulp-notify';exportdefault()=>(exports.default=()=>{constsizeInstance=size();returngulp.src('fixture.js').pipe(sizeInstance).pipe(gulp.dest('dist')).pipe(notify({onLast:true,message:()=>`Total size${sizeInstance.prettySize}`}));};
About
Display the size of your project
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.
