UNPKG

1.05 kBMarkdownView Raw
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
7Logs 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
20var gulp = require('gulp');
21var size = require('gulp-size');
22
23gulp.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
39Type: `boolean`
40Default: `false`
41
42Displays the size of every file instead of just the total size.
43
44##### gzip
45
46Type: `boolean`
47Default: `false`
48
49Displays the gzipped size instead.
50
51##### title
52
53Type: `string`
54Default: ''
55
56Give 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)