1 | # [gulp](http://gulpjs.com)-size [![Build Status](https://travis-ci.org/sindresorhus/gulp-size.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-size)
|
2 |
|
3 | > Display the size of your project
|
4 |
|
5 | ![](screenshot.png)
|
6 |
|
7 | Logs out the total size of files in the stream and optionally the individual file-sizes.
|
8 |
|
9 |
|
10 | ## Install
|
11 |
|
12 | ```bash
|
13 | $ npm install --save-dev gulp-size
|
14 | ```
|
15 |
|
16 |
|
17 | ## Usage
|
18 |
|
19 | ```js
|
20 | var gulp = require('gulp');
|
21 | var size = require('gulp-size');
|
22 |
|
23 | gulp.task('default', function () {
|
24 | return gulp.src('fixture.js')
|
25 | .pipe(size())
|
26 | .pipe(gulp.dest('dist'));
|
27 | });
|
28 | ```
|
29 |
|
30 |
|
31 | ## API
|
32 |
|
33 | ### size(options)
|
34 |
|
35 | #### options
|
36 |
|
37 | ##### showFiles
|
38 |
|
39 | Type: `boolean`
|
40 | Default: `false`
|
41 |
|
42 | Displays the size of every file instead of just the total size.
|
43 |
|
44 | ##### gzip
|
45 |
|
46 | Type: `boolean`
|
47 | Default: `false`
|
48 |
|
49 | Displays the gzipped size instead.
|
50 |
|
51 | ##### title
|
52 |
|
53 | Type: `string`
|
54 | Default: ''
|
55 |
|
56 | Give it a title so it's possible to distinguish the output of multiple instances logging at once.
|
57 |
|
58 |
|
59 | ## License
|
60 |
|
61 | [MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)
|